diff options
Diffstat (limited to 'src/can0/txbto.rs')
| -rw-r--r-- | src/can0/txbto.rs | 641 |
1 files changed, 641 insertions, 0 deletions
diff --git a/src/can0/txbto.rs b/src/can0/txbto.rs new file mode 100644 index 0000000..2783eb3 --- /dev/null +++ b/src/can0/txbto.rs @@ -0,0 +1,641 @@ +#[doc = "Register `TXBTO` reader"] +pub struct R(crate::R<TXBTO_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<TXBTO_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<TXBTO_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<TXBTO_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Field `TO0` reader - Transmission Occurred 0"] +pub struct TO0_R(crate::FieldReader<bool, bool>); +impl TO0_R { + pub(crate) fn new(bits: bool) -> Self { + TO0_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO0_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO1` reader - Transmission Occurred 1"] +pub struct TO1_R(crate::FieldReader<bool, bool>); +impl TO1_R { + pub(crate) fn new(bits: bool) -> Self { + TO1_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO1_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO2` reader - Transmission Occurred 2"] +pub struct TO2_R(crate::FieldReader<bool, bool>); +impl TO2_R { + pub(crate) fn new(bits: bool) -> Self { + TO2_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO2_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO3` reader - Transmission Occurred 3"] +pub struct TO3_R(crate::FieldReader<bool, bool>); +impl TO3_R { + pub(crate) fn new(bits: bool) -> Self { + TO3_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO3_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO4` reader - Transmission Occurred 4"] +pub struct TO4_R(crate::FieldReader<bool, bool>); +impl TO4_R { + pub(crate) fn new(bits: bool) -> Self { + TO4_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO4_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO5` reader - Transmission Occurred 5"] +pub struct TO5_R(crate::FieldReader<bool, bool>); +impl TO5_R { + pub(crate) fn new(bits: bool) -> Self { + TO5_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO5_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO6` reader - Transmission Occurred 6"] +pub struct TO6_R(crate::FieldReader<bool, bool>); +impl TO6_R { + pub(crate) fn new(bits: bool) -> Self { + TO6_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO6_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO7` reader - Transmission Occurred 7"] +pub struct TO7_R(crate::FieldReader<bool, bool>); +impl TO7_R { + pub(crate) fn new(bits: bool) -> Self { + TO7_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO7_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO8` reader - Transmission Occurred 8"] +pub struct TO8_R(crate::FieldReader<bool, bool>); +impl TO8_R { + pub(crate) fn new(bits: bool) -> Self { + TO8_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO8_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO9` reader - Transmission Occurred 9"] +pub struct TO9_R(crate::FieldReader<bool, bool>); +impl TO9_R { + pub(crate) fn new(bits: bool) -> Self { + TO9_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO9_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO10` reader - Transmission Occurred 10"] +pub struct TO10_R(crate::FieldReader<bool, bool>); +impl TO10_R { + pub(crate) fn new(bits: bool) -> Self { + TO10_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO10_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO11` reader - Transmission Occurred 11"] +pub struct TO11_R(crate::FieldReader<bool, bool>); +impl TO11_R { + pub(crate) fn new(bits: bool) -> Self { + TO11_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO11_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO12` reader - Transmission Occurred 12"] +pub struct TO12_R(crate::FieldReader<bool, bool>); +impl TO12_R { + pub(crate) fn new(bits: bool) -> Self { + TO12_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO12_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO13` reader - Transmission Occurred 13"] +pub struct TO13_R(crate::FieldReader<bool, bool>); +impl TO13_R { + pub(crate) fn new(bits: bool) -> Self { + TO13_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO13_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO14` reader - Transmission Occurred 14"] +pub struct TO14_R(crate::FieldReader<bool, bool>); +impl TO14_R { + pub(crate) fn new(bits: bool) -> Self { + TO14_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO14_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO15` reader - Transmission Occurred 15"] +pub struct TO15_R(crate::FieldReader<bool, bool>); +impl TO15_R { + pub(crate) fn new(bits: bool) -> Self { + TO15_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO15_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO16` reader - Transmission Occurred 16"] +pub struct TO16_R(crate::FieldReader<bool, bool>); +impl TO16_R { + pub(crate) fn new(bits: bool) -> Self { + TO16_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO16_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO17` reader - Transmission Occurred 17"] +pub struct TO17_R(crate::FieldReader<bool, bool>); +impl TO17_R { + pub(crate) fn new(bits: bool) -> Self { + TO17_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO17_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO18` reader - Transmission Occurred 18"] +pub struct TO18_R(crate::FieldReader<bool, bool>); +impl TO18_R { + pub(crate) fn new(bits: bool) -> Self { + TO18_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO18_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO19` reader - Transmission Occurred 19"] +pub struct TO19_R(crate::FieldReader<bool, bool>); +impl TO19_R { + pub(crate) fn new(bits: bool) -> Self { + TO19_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO19_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO20` reader - Transmission Occurred 20"] +pub struct TO20_R(crate::FieldReader<bool, bool>); +impl TO20_R { + pub(crate) fn new(bits: bool) -> Self { + TO20_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO20_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO21` reader - Transmission Occurred 21"] +pub struct TO21_R(crate::FieldReader<bool, bool>); +impl TO21_R { + pub(crate) fn new(bits: bool) -> Self { + TO21_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO21_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO22` reader - Transmission Occurred 22"] +pub struct TO22_R(crate::FieldReader<bool, bool>); +impl TO22_R { + pub(crate) fn new(bits: bool) -> Self { + TO22_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO22_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO23` reader - Transmission Occurred 23"] +pub struct TO23_R(crate::FieldReader<bool, bool>); +impl TO23_R { + pub(crate) fn new(bits: bool) -> Self { + TO23_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO23_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO24` reader - Transmission Occurred 24"] +pub struct TO24_R(crate::FieldReader<bool, bool>); +impl TO24_R { + pub(crate) fn new(bits: bool) -> Self { + TO24_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO24_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO25` reader - Transmission Occurred 25"] +pub struct TO25_R(crate::FieldReader<bool, bool>); +impl TO25_R { + pub(crate) fn new(bits: bool) -> Self { + TO25_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO25_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO26` reader - Transmission Occurred 26"] +pub struct TO26_R(crate::FieldReader<bool, bool>); +impl TO26_R { + pub(crate) fn new(bits: bool) -> Self { + TO26_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO26_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO27` reader - Transmission Occurred 27"] +pub struct TO27_R(crate::FieldReader<bool, bool>); +impl TO27_R { + pub(crate) fn new(bits: bool) -> Self { + TO27_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO27_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO28` reader - Transmission Occurred 28"] +pub struct TO28_R(crate::FieldReader<bool, bool>); +impl TO28_R { + pub(crate) fn new(bits: bool) -> Self { + TO28_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO28_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO29` reader - Transmission Occurred 29"] +pub struct TO29_R(crate::FieldReader<bool, bool>); +impl TO29_R { + pub(crate) fn new(bits: bool) -> Self { + TO29_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO29_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO30` reader - Transmission Occurred 30"] +pub struct TO30_R(crate::FieldReader<bool, bool>); +impl TO30_R { + pub(crate) fn new(bits: bool) -> Self { + TO30_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO30_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `TO31` reader - Transmission Occurred 31"] +pub struct TO31_R(crate::FieldReader<bool, bool>); +impl TO31_R { + pub(crate) fn new(bits: bool) -> Self { + TO31_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for TO31_R { + type Target = crate::FieldReader<bool, bool>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl R { + #[doc = "Bit 0 - Transmission Occurred 0"] + #[inline(always)] + pub fn to0(&self) -> TO0_R { + TO0_R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - Transmission Occurred 1"] + #[inline(always)] + pub fn to1(&self) -> TO1_R { + TO1_R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - Transmission Occurred 2"] + #[inline(always)] + pub fn to2(&self) -> TO2_R { + TO2_R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - Transmission Occurred 3"] + #[inline(always)] + pub fn to3(&self) -> TO3_R { + TO3_R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - Transmission Occurred 4"] + #[inline(always)] + pub fn to4(&self) -> TO4_R { + TO4_R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - Transmission Occurred 5"] + #[inline(always)] + pub fn to5(&self) -> TO5_R { + TO5_R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - Transmission Occurred 6"] + #[inline(always)] + pub fn to6(&self) -> TO6_R { + TO6_R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - Transmission Occurred 7"] + #[inline(always)] + pub fn to7(&self) -> TO7_R { + TO7_R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - Transmission Occurred 8"] + #[inline(always)] + pub fn to8(&self) -> TO8_R { + TO8_R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - Transmission Occurred 9"] + #[inline(always)] + pub fn to9(&self) -> TO9_R { + TO9_R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - Transmission Occurred 10"] + #[inline(always)] + pub fn to10(&self) -> TO10_R { + TO10_R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - Transmission Occurred 11"] + #[inline(always)] + pub fn to11(&self) -> TO11_R { + TO11_R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - Transmission Occurred 12"] + #[inline(always)] + pub fn to12(&self) -> TO12_R { + TO12_R::new(((self.bits >> 12) & 0x01) != 0) + } + #[doc = "Bit 13 - Transmission Occurred 13"] + #[inline(always)] + pub fn to13(&self) -> TO13_R { + TO13_R::new(((self.bits >> 13) & 0x01) != 0) + } + #[doc = "Bit 14 - Transmission Occurred 14"] + #[inline(always)] + pub fn to14(&self) -> TO14_R { + TO14_R::new(((self.bits >> 14) & 0x01) != 0) + } + #[doc = "Bit 15 - Transmission Occurred 15"] + #[inline(always)] + pub fn to15(&self) -> TO15_R { + TO15_R::new(((self.bits >> 15) & 0x01) != 0) + } + #[doc = "Bit 16 - Transmission Occurred 16"] + #[inline(always)] + pub fn to16(&self) -> TO16_R { + TO16_R::new(((self.bits >> 16) & 0x01) != 0) + } + #[doc = "Bit 17 - Transmission Occurred 17"] + #[inline(always)] + pub fn to17(&self) -> TO17_R { + TO17_R::new(((self.bits >> 17) & 0x01) != 0) + } + #[doc = "Bit 18 - Transmission Occurred 18"] + #[inline(always)] + pub fn to18(&self) -> TO18_R { + TO18_R::new(((self.bits >> 18) & 0x01) != 0) + } + #[doc = "Bit 19 - Transmission Occurred 19"] + #[inline(always)] + pub fn to19(&self) -> TO19_R { + TO19_R::new(((self.bits >> 19) & 0x01) != 0) + } + #[doc = "Bit 20 - Transmission Occurred 20"] + #[inline(always)] + pub fn to20(&self) -> TO20_R { + TO20_R::new(((self.bits >> 20) & 0x01) != 0) + } + #[doc = "Bit 21 - Transmission Occurred 21"] + #[inline(always)] + pub fn to21(&self) -> TO21_R { + TO21_R::new(((self.bits >> 21) & 0x01) != 0) + } + #[doc = "Bit 22 - Transmission Occurred 22"] + #[inline(always)] + pub fn to22(&self) -> TO22_R { + TO22_R::new(((self.bits >> 22) & 0x01) != 0) + } + #[doc = "Bit 23 - Transmission Occurred 23"] + #[inline(always)] + pub fn to23(&self) -> TO23_R { + TO23_R::new(((self.bits >> 23) & 0x01) != 0) + } + #[doc = "Bit 24 - Transmission Occurred 24"] + #[inline(always)] + pub fn to24(&self) -> TO24_R { + TO24_R::new(((self.bits >> 24) & 0x01) != 0) + } + #[doc = "Bit 25 - Transmission Occurred 25"] + #[inline(always)] + pub fn to25(&self) -> TO25_R { + TO25_R::new(((self.bits >> 25) & 0x01) != 0) + } + #[doc = "Bit 26 - Transmission Occurred 26"] + #[inline(always)] + pub fn to26(&self) -> TO26_R { + TO26_R::new(((self.bits >> 26) & 0x01) != 0) + } + #[doc = "Bit 27 - Transmission Occurred 27"] + #[inline(always)] + pub fn to27(&self) -> TO27_R { + TO27_R::new(((self.bits >> 27) & 0x01) != 0) + } + #[doc = "Bit 28 - Transmission Occurred 28"] + #[inline(always)] + pub fn to28(&self) -> TO28_R { + TO28_R::new(((self.bits >> 28) & 0x01) != 0) + } + #[doc = "Bit 29 - Transmission Occurred 29"] + #[inline(always)] + pub fn to29(&self) -> TO29_R { + TO29_R::new(((self.bits >> 29) & 0x01) != 0) + } + #[doc = "Bit 30 - Transmission Occurred 30"] + #[inline(always)] + pub fn to30(&self) -> TO30_R { + TO30_R::new(((self.bits >> 30) & 0x01) != 0) + } + #[doc = "Bit 31 - Transmission Occurred 31"] + #[inline(always)] + pub fn to31(&self) -> TO31_R { + TO31_R::new(((self.bits >> 31) & 0x01) != 0) + } +} +#[doc = "Tx Buffer Transmission Occurred\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [txbto](index.html) module"] +pub struct TXBTO_SPEC; +impl crate::RegisterSpec for TXBTO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txbto::R](R) reader structure"] +impl crate::Readable for TXBTO_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TXBTO to value 0"] +impl crate::Resettable for TXBTO_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} |
