diff options
28 files changed, 0 insertions, 6559 deletions
diff --git a/embassy-stm32/src/can/bx/pac/can.rs b/embassy-stm32/src/can/bx/pac/can.rs deleted file mode 100644 index 726f5d0ae..000000000 --- a/embassy-stm32/src/can/bx/pac/can.rs +++ /dev/null | |||
| @@ -1,213 +0,0 @@ | |||
| 1 | /// Register block of bxCAN peripherals. | ||
| 2 | #[repr(C)] | ||
| 3 | pub struct RegisterBlock { | ||
| 4 | #[doc = "0x00 - CAN_MCR"] | ||
| 5 | pub(crate) mcr: MCR, | ||
| 6 | #[doc = "0x04 - CAN_MSR"] | ||
| 7 | pub(crate) msr: MSR, | ||
| 8 | #[doc = "0x08 - CAN_TSR"] | ||
| 9 | pub(crate) tsr: TSR, | ||
| 10 | #[doc = "0x0c - CAN_RF0R"] | ||
| 11 | pub(crate) rfr: [RFR; 2], | ||
| 12 | #[doc = "0x14 - CAN_IER"] | ||
| 13 | pub(crate) ier: IER, | ||
| 14 | #[doc = "0x18 - CAN_ESR"] | ||
| 15 | pub(crate) esr: ESR, | ||
| 16 | #[doc = "0x1c - CAN_BTR"] | ||
| 17 | pub(crate) btr: BTR, | ||
| 18 | _reserved7: [u8; 352usize], | ||
| 19 | #[doc = "0x180 - CAN Transmit cluster"] | ||
| 20 | pub(crate) tx: [TX; 3], | ||
| 21 | #[doc = "0x1b0 - CAN Receive cluster"] | ||
| 22 | pub(crate) rx: [RX; 2], | ||
| 23 | _reserved9: [u8; 48usize], | ||
| 24 | #[doc = "0x200 - CAN_FMR"] | ||
| 25 | pub(crate) fmr: FMR, | ||
| 26 | #[doc = "0x204 - CAN_FM1R"] | ||
| 27 | pub(crate) fm1r: FM1R, | ||
| 28 | _reserved11: [u8; 4usize], | ||
| 29 | #[doc = "0x20c - CAN_FS1R"] | ||
| 30 | pub(crate) fs1r: FS1R, | ||
| 31 | _reserved12: [u8; 4usize], | ||
| 32 | #[doc = "0x214 - CAN_FFA1R"] | ||
| 33 | pub(crate) ffa1r: FFA1R, | ||
| 34 | _reserved13: [u8; 4usize], | ||
| 35 | #[doc = "0x21c - CAN_FA1R"] | ||
| 36 | pub(crate) fa1r: FA1R, | ||
| 37 | _reserved14: [u8; 32usize], | ||
| 38 | #[doc = "0x240 - CAN Filter Bank cluster"] | ||
| 39 | pub(crate) fb: [FB; 28], // UP TO 28, but 14 in some devices | ||
| 40 | } | ||
| 41 | #[doc = r"Register block"] | ||
| 42 | #[repr(C)] | ||
| 43 | pub struct TX { | ||
| 44 | #[doc = "0x00 - CAN_TI0R"] | ||
| 45 | pub tir: self::tx::TIR, | ||
| 46 | #[doc = "0x04 - CAN_TDT0R"] | ||
| 47 | pub tdtr: self::tx::TDTR, | ||
| 48 | #[doc = "0x08 - CAN_TDL0R"] | ||
| 49 | pub tdlr: self::tx::TDLR, | ||
| 50 | #[doc = "0x0c - CAN_TDH0R"] | ||
| 51 | pub tdhr: self::tx::TDHR, | ||
| 52 | } | ||
| 53 | #[doc = r"Register block"] | ||
| 54 | #[doc = "CAN Transmit cluster"] | ||
| 55 | pub mod tx; | ||
| 56 | #[doc = r"Register block"] | ||
| 57 | #[repr(C)] | ||
| 58 | pub struct RX { | ||
| 59 | #[doc = "0x00 - CAN_RI0R"] | ||
| 60 | pub rir: self::rx::RIR, | ||
| 61 | #[doc = "0x04 - CAN_RDT0R"] | ||
| 62 | pub rdtr: self::rx::RDTR, | ||
| 63 | #[doc = "0x08 - CAN_RDL0R"] | ||
| 64 | pub rdlr: self::rx::RDLR, | ||
| 65 | #[doc = "0x0c - CAN_RDH0R"] | ||
| 66 | pub rdhr: self::rx::RDHR, | ||
| 67 | } | ||
| 68 | #[doc = r"Register block"] | ||
| 69 | #[doc = "CAN Receive cluster"] | ||
| 70 | pub mod rx; | ||
| 71 | #[doc = r"Register block"] | ||
| 72 | #[repr(C)] | ||
| 73 | pub struct FB { | ||
| 74 | #[doc = "0x00 - Filter bank 0 register 1"] | ||
| 75 | pub fr1: self::fb::FR1, | ||
| 76 | #[doc = "0x04 - Filter bank 0 register 2"] | ||
| 77 | pub fr2: self::fb::FR2, | ||
| 78 | } | ||
| 79 | #[doc = r"Register block"] | ||
| 80 | #[doc = "CAN Filter Bank cluster"] | ||
| 81 | pub mod fb; | ||
| 82 | #[doc = "CAN_MCR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mcr](mcr) module"] | ||
| 83 | pub type MCR = crate::can::bx::Reg<u32, _MCR>; | ||
| 84 | #[allow(missing_docs)] | ||
| 85 | #[doc(hidden)] | ||
| 86 | pub struct _MCR; | ||
| 87 | #[doc = "`read()` method returns [mcr::R](mcr::R) reader structure"] | ||
| 88 | impl crate::can::bx::Readable for MCR {} | ||
| 89 | #[doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure"] | ||
| 90 | impl crate::can::bx::Writable for MCR {} | ||
| 91 | #[doc = "CAN_MCR"] | ||
| 92 | pub mod mcr; | ||
| 93 | #[doc = "CAN_MSR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [msr](msr) module"] | ||
| 94 | pub type MSR = crate::can::bx::Reg<u32, _MSR>; | ||
| 95 | #[allow(missing_docs)] | ||
| 96 | #[doc(hidden)] | ||
| 97 | pub struct _MSR; | ||
| 98 | #[doc = "`read()` method returns [msr::R](msr::R) reader structure"] | ||
| 99 | impl crate::can::bx::Readable for MSR {} | ||
| 100 | #[doc = "`write(|w| ..)` method takes [msr::W](msr::W) writer structure"] | ||
| 101 | impl crate::can::bx::Writable for MSR {} | ||
| 102 | #[doc = "CAN_MSR"] | ||
| 103 | pub mod msr; | ||
| 104 | #[doc = "CAN_TSR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tsr](tsr) module"] | ||
| 105 | pub type TSR = crate::can::bx::Reg<u32, _TSR>; | ||
| 106 | #[allow(missing_docs)] | ||
| 107 | #[doc(hidden)] | ||
| 108 | pub struct _TSR; | ||
| 109 | #[doc = "`read()` method returns [tsr::R](tsr::R) reader structure"] | ||
| 110 | impl crate::can::bx::Readable for TSR {} | ||
| 111 | #[doc = "`write(|w| ..)` method takes [tsr::W](tsr::W) writer structure"] | ||
| 112 | impl crate::can::bx::Writable for TSR {} | ||
| 113 | #[doc = "CAN_TSR"] | ||
| 114 | pub mod tsr; | ||
| 115 | #[doc = "CAN_RF0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rfr](rfr) module"] | ||
| 116 | pub type RFR = crate::can::bx::Reg<u32, _RFR>; | ||
| 117 | #[allow(missing_docs)] | ||
| 118 | #[doc(hidden)] | ||
| 119 | pub struct _RFR; | ||
| 120 | #[doc = "`read()` method returns [rfr::R](rfr::R) reader structure"] | ||
| 121 | impl crate::can::bx::Readable for RFR {} | ||
| 122 | #[doc = "`write(|w| ..)` method takes [rfr::W](rfr::W) writer structure"] | ||
| 123 | impl crate::can::bx::Writable for RFR {} | ||
| 124 | #[doc = "CAN_RF0R"] | ||
| 125 | pub mod rfr; | ||
| 126 | #[doc = "CAN_IER\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ier](ier) module"] | ||
| 127 | pub type IER = crate::can::bx::Reg<u32, _IER>; | ||
| 128 | #[allow(missing_docs)] | ||
| 129 | #[doc(hidden)] | ||
| 130 | pub struct _IER; | ||
| 131 | #[doc = "`read()` method returns [ier::R](ier::R) reader structure"] | ||
| 132 | impl crate::can::bx::Readable for IER {} | ||
| 133 | #[doc = "`write(|w| ..)` method takes [ier::W](ier::W) writer structure"] | ||
| 134 | impl crate::can::bx::Writable for IER {} | ||
| 135 | #[doc = "CAN_IER"] | ||
| 136 | pub mod ier; | ||
| 137 | #[doc = "CAN_ESR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [esr](esr) module"] | ||
| 138 | pub type ESR = crate::can::bx::Reg<u32, _ESR>; | ||
| 139 | #[allow(missing_docs)] | ||
| 140 | #[doc(hidden)] | ||
| 141 | pub struct _ESR; | ||
| 142 | #[doc = "`read()` method returns [esr::R](esr::R) reader structure"] | ||
| 143 | impl crate::can::bx::Readable for ESR {} | ||
| 144 | #[doc = "`write(|w| ..)` method takes [esr::W](esr::W) writer structure"] | ||
| 145 | impl crate::can::bx::Writable for ESR {} | ||
| 146 | #[doc = "CAN_ESR"] | ||
| 147 | pub mod esr; | ||
| 148 | #[doc = "CAN_BTR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [btr](btr) module"] | ||
| 149 | pub type BTR = crate::can::bx::Reg<u32, _BTR>; | ||
| 150 | #[allow(missing_docs)] | ||
| 151 | #[doc(hidden)] | ||
| 152 | pub struct _BTR; | ||
| 153 | #[doc = "`read()` method returns [btr::R](btr::R) reader structure"] | ||
| 154 | impl crate::can::bx::Readable for BTR {} | ||
| 155 | #[doc = "`write(|w| ..)` method takes [btr::W](btr::W) writer structure"] | ||
| 156 | impl crate::can::bx::Writable for BTR {} | ||
| 157 | #[doc = "CAN_BTR"] | ||
| 158 | pub mod btr; | ||
| 159 | #[doc = "CAN_FMR\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fmr](fmr) module"] | ||
| 160 | pub type FMR = crate::can::bx::Reg<u32, _FMR>; | ||
| 161 | #[allow(missing_docs)] | ||
| 162 | #[doc(hidden)] | ||
| 163 | pub struct _FMR; | ||
| 164 | #[doc = "`read()` method returns [fmr::R](fmr::R) reader structure"] | ||
| 165 | impl crate::can::bx::Readable for FMR {} | ||
| 166 | #[doc = "`write(|w| ..)` method takes [fmr::W](fmr::W) writer structure"] | ||
| 167 | impl crate::can::bx::Writable for FMR {} | ||
| 168 | #[doc = "CAN_FMR"] | ||
| 169 | pub mod fmr; | ||
| 170 | #[doc = "CAN_FM1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fm1r](fm1r) module"] | ||
| 171 | pub type FM1R = crate::can::bx::Reg<u32, _FM1R>; | ||
| 172 | #[allow(missing_docs)] | ||
| 173 | #[doc(hidden)] | ||
| 174 | pub struct _FM1R; | ||
| 175 | #[doc = "`read()` method returns [fm1r::R](fm1r::R) reader structure"] | ||
| 176 | impl crate::can::bx::Readable for FM1R {} | ||
| 177 | #[doc = "`write(|w| ..)` method takes [fm1r::W](fm1r::W) writer structure"] | ||
| 178 | impl crate::can::bx::Writable for FM1R {} | ||
| 179 | #[doc = "CAN_FM1R"] | ||
| 180 | pub mod fm1r; | ||
| 181 | #[doc = "CAN_FS1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fs1r](fs1r) module"] | ||
| 182 | pub type FS1R = crate::can::bx::Reg<u32, _FS1R>; | ||
| 183 | #[allow(missing_docs)] | ||
| 184 | #[doc(hidden)] | ||
| 185 | pub struct _FS1R; | ||
| 186 | #[doc = "`read()` method returns [fs1r::R](fs1r::R) reader structure"] | ||
| 187 | impl crate::can::bx::Readable for FS1R {} | ||
| 188 | #[doc = "`write(|w| ..)` method takes [fs1r::W](fs1r::W) writer structure"] | ||
| 189 | impl crate::can::bx::Writable for FS1R {} | ||
| 190 | #[doc = "CAN_FS1R"] | ||
| 191 | pub mod fs1r; | ||
| 192 | #[doc = "CAN_FFA1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ffa1r](ffa1r) module"] | ||
| 193 | pub type FFA1R = crate::can::bx::Reg<u32, _FFA1R>; | ||
| 194 | #[allow(missing_docs)] | ||
| 195 | #[doc(hidden)] | ||
| 196 | pub struct _FFA1R; | ||
| 197 | #[doc = "`read()` method returns [ffa1r::R](ffa1r::R) reader structure"] | ||
| 198 | impl crate::can::bx::Readable for FFA1R {} | ||
| 199 | #[doc = "`write(|w| ..)` method takes [ffa1r::W](ffa1r::W) writer structure"] | ||
| 200 | impl crate::can::bx::Writable for FFA1R {} | ||
| 201 | #[doc = "CAN_FFA1R"] | ||
| 202 | pub mod ffa1r; | ||
| 203 | #[doc = "CAN_FA1R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fa1r](fa1r) module"] | ||
| 204 | pub type FA1R = crate::can::bx::Reg<u32, _FA1R>; | ||
| 205 | #[allow(missing_docs)] | ||
| 206 | #[doc(hidden)] | ||
| 207 | pub struct _FA1R; | ||
| 208 | #[doc = "`read()` method returns [fa1r::R](fa1r::R) reader structure"] | ||
| 209 | impl crate::can::bx::Readable for FA1R {} | ||
| 210 | #[doc = "`write(|w| ..)` method takes [fa1r::W](fa1r::W) writer structure"] | ||
| 211 | impl crate::can::bx::Writable for FA1R {} | ||
| 212 | #[doc = "CAN_FA1R"] | ||
| 213 | pub mod fa1r; | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/btr.rs b/embassy-stm32/src/can/bx/pac/can/btr.rs deleted file mode 100644 index 23ca298aa..000000000 --- a/embassy-stm32/src/can/bx/pac/can/btr.rs +++ /dev/null | |||
| @@ -1,282 +0,0 @@ | |||
| 1 | #[doc = "Reader of register BTR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::BTR>; | ||
| 3 | #[doc = "Writer for register BTR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::BTR>; | ||
| 5 | #[doc = "Register BTR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::BTR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "SILM\n\nValue on reset: 0"] | ||
| 14 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 15 | pub enum SILM_A { | ||
| 16 | #[doc = "0: Normal operation"] | ||
| 17 | NORMAL = 0, | ||
| 18 | #[doc = "1: Silent Mode"] | ||
| 19 | SILENT = 1, | ||
| 20 | } | ||
| 21 | impl From<SILM_A> for bool { | ||
| 22 | #[inline(always)] | ||
| 23 | fn from(variant: SILM_A) -> Self { | ||
| 24 | variant as u8 != 0 | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `SILM`"] | ||
| 28 | pub type SILM_R = crate::can::bx::R<bool, SILM_A>; | ||
| 29 | impl SILM_R { | ||
| 30 | #[doc = r"Get enumerated values variant"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn variant(&self) -> SILM_A { | ||
| 33 | match self.bits { | ||
| 34 | false => SILM_A::NORMAL, | ||
| 35 | true => SILM_A::SILENT, | ||
| 36 | } | ||
| 37 | } | ||
| 38 | #[doc = "Checks if the value of the field is `NORMAL`"] | ||
| 39 | #[inline(always)] | ||
| 40 | pub fn is_normal(&self) -> bool { | ||
| 41 | *self == SILM_A::NORMAL | ||
| 42 | } | ||
| 43 | #[doc = "Checks if the value of the field is `SILENT`"] | ||
| 44 | #[inline(always)] | ||
| 45 | pub fn is_silent(&self) -> bool { | ||
| 46 | *self == SILM_A::SILENT | ||
| 47 | } | ||
| 48 | } | ||
| 49 | #[doc = "Write proxy for field `SILM`"] | ||
| 50 | pub struct SILM_W<'a> { | ||
| 51 | w: &'a mut W, | ||
| 52 | } | ||
| 53 | impl<'a> SILM_W<'a> { | ||
| 54 | #[doc = r"Writes `variant` to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn variant(self, variant: SILM_A) -> &'a mut W { | ||
| 57 | { | ||
| 58 | self.bit(variant.into()) | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Normal operation"] | ||
| 62 | #[inline(always)] | ||
| 63 | pub fn normal(self) -> &'a mut W { | ||
| 64 | self.variant(SILM_A::NORMAL) | ||
| 65 | } | ||
| 66 | #[doc = "Silent Mode"] | ||
| 67 | #[inline(always)] | ||
| 68 | pub fn silent(self) -> &'a mut W { | ||
| 69 | self.variant(SILM_A::SILENT) | ||
| 70 | } | ||
| 71 | #[doc = r"Sets the field bit"] | ||
| 72 | #[inline(always)] | ||
| 73 | pub fn set_bit(self) -> &'a mut W { | ||
| 74 | self.bit(true) | ||
| 75 | } | ||
| 76 | #[doc = r"Clears the field bit"] | ||
| 77 | #[inline(always)] | ||
| 78 | pub fn clear_bit(self) -> &'a mut W { | ||
| 79 | self.bit(false) | ||
| 80 | } | ||
| 81 | #[doc = r"Writes raw bits to the field"] | ||
| 82 | #[inline(always)] | ||
| 83 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 84 | self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); | ||
| 85 | self.w | ||
| 86 | } | ||
| 87 | } | ||
| 88 | #[doc = "LBKM\n\nValue on reset: 0"] | ||
| 89 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 90 | pub enum LBKM_A { | ||
| 91 | #[doc = "0: Loop Back Mode disabled"] | ||
| 92 | DISABLED = 0, | ||
| 93 | #[doc = "1: Loop Back Mode enabled"] | ||
| 94 | ENABLED = 1, | ||
| 95 | } | ||
| 96 | impl From<LBKM_A> for bool { | ||
| 97 | #[inline(always)] | ||
| 98 | fn from(variant: LBKM_A) -> Self { | ||
| 99 | variant as u8 != 0 | ||
| 100 | } | ||
| 101 | } | ||
| 102 | #[doc = "Reader of field `LBKM`"] | ||
| 103 | pub type LBKM_R = crate::can::bx::R<bool, LBKM_A>; | ||
| 104 | impl LBKM_R { | ||
| 105 | #[doc = r"Get enumerated values variant"] | ||
| 106 | #[inline(always)] | ||
| 107 | pub fn variant(&self) -> LBKM_A { | ||
| 108 | match self.bits { | ||
| 109 | false => LBKM_A::DISABLED, | ||
| 110 | true => LBKM_A::ENABLED, | ||
| 111 | } | ||
| 112 | } | ||
| 113 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 114 | #[inline(always)] | ||
| 115 | pub fn is_disabled(&self) -> bool { | ||
| 116 | *self == LBKM_A::DISABLED | ||
| 117 | } | ||
| 118 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 119 | #[inline(always)] | ||
| 120 | pub fn is_enabled(&self) -> bool { | ||
| 121 | *self == LBKM_A::ENABLED | ||
| 122 | } | ||
| 123 | } | ||
| 124 | #[doc = "Write proxy for field `LBKM`"] | ||
| 125 | pub struct LBKM_W<'a> { | ||
| 126 | w: &'a mut W, | ||
| 127 | } | ||
| 128 | impl<'a> LBKM_W<'a> { | ||
| 129 | #[doc = r"Writes `variant` to the field"] | ||
| 130 | #[inline(always)] | ||
| 131 | pub fn variant(self, variant: LBKM_A) -> &'a mut W { | ||
| 132 | { | ||
| 133 | self.bit(variant.into()) | ||
| 134 | } | ||
| 135 | } | ||
| 136 | #[doc = "Loop Back Mode disabled"] | ||
| 137 | #[inline(always)] | ||
| 138 | pub fn disabled(self) -> &'a mut W { | ||
| 139 | self.variant(LBKM_A::DISABLED) | ||
| 140 | } | ||
| 141 | #[doc = "Loop Back Mode enabled"] | ||
| 142 | #[inline(always)] | ||
| 143 | pub fn enabled(self) -> &'a mut W { | ||
| 144 | self.variant(LBKM_A::ENABLED) | ||
| 145 | } | ||
| 146 | #[doc = r"Sets the field bit"] | ||
| 147 | #[inline(always)] | ||
| 148 | pub fn set_bit(self) -> &'a mut W { | ||
| 149 | self.bit(true) | ||
| 150 | } | ||
| 151 | #[doc = r"Clears the field bit"] | ||
| 152 | #[inline(always)] | ||
| 153 | pub fn clear_bit(self) -> &'a mut W { | ||
| 154 | self.bit(false) | ||
| 155 | } | ||
| 156 | #[doc = r"Writes raw bits to the field"] | ||
| 157 | #[inline(always)] | ||
| 158 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 159 | self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); | ||
| 160 | self.w | ||
| 161 | } | ||
| 162 | } | ||
| 163 | #[doc = "Reader of field `SJW`"] | ||
| 164 | pub type SJW_R = crate::can::bx::R<u8, u8>; | ||
| 165 | #[doc = "Write proxy for field `SJW`"] | ||
| 166 | pub struct SJW_W<'a> { | ||
| 167 | w: &'a mut W, | ||
| 168 | } | ||
| 169 | impl<'a> SJW_W<'a> { | ||
| 170 | #[doc = r"Writes raw bits to the field"] | ||
| 171 | #[inline(always)] | ||
| 172 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 173 | self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); | ||
| 174 | self.w | ||
| 175 | } | ||
| 176 | } | ||
| 177 | #[doc = "Reader of field `TS2`"] | ||
| 178 | pub type TS2_R = crate::can::bx::R<u8, u8>; | ||
| 179 | #[doc = "Write proxy for field `TS2`"] | ||
| 180 | pub struct TS2_W<'a> { | ||
| 181 | w: &'a mut W, | ||
| 182 | } | ||
| 183 | impl<'a> TS2_W<'a> { | ||
| 184 | #[doc = r"Writes raw bits to the field"] | ||
| 185 | #[inline(always)] | ||
| 186 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 187 | self.w.bits = (self.w.bits & !(0x07 << 20)) | (((value as u32) & 0x07) << 20); | ||
| 188 | self.w | ||
| 189 | } | ||
| 190 | } | ||
| 191 | #[doc = "Reader of field `TS1`"] | ||
| 192 | pub type TS1_R = crate::can::bx::R<u8, u8>; | ||
| 193 | #[doc = "Write proxy for field `TS1`"] | ||
| 194 | pub struct TS1_W<'a> { | ||
| 195 | w: &'a mut W, | ||
| 196 | } | ||
| 197 | impl<'a> TS1_W<'a> { | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `BRP`"] | ||
| 206 | pub type BRP_R = crate::can::bx::R<u16, u16>; | ||
| 207 | #[doc = "Write proxy for field `BRP`"] | ||
| 208 | pub struct BRP_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> BRP_W<'a> { | ||
| 212 | #[doc = r"Writes raw bits to the field"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub unsafe fn bits(self, value: u16) -> &'a mut W { | ||
| 215 | self.w.bits = (self.w.bits & !0x03ff) | ((value as u32) & 0x03ff); | ||
| 216 | self.w | ||
| 217 | } | ||
| 218 | } | ||
| 219 | impl R { | ||
| 220 | #[doc = "Bit 31 - SILM"] | ||
| 221 | #[inline(always)] | ||
| 222 | pub fn silm(&self) -> SILM_R { | ||
| 223 | SILM_R::new(((self.bits >> 31) & 0x01) != 0) | ||
| 224 | } | ||
| 225 | #[doc = "Bit 30 - LBKM"] | ||
| 226 | #[inline(always)] | ||
| 227 | pub fn lbkm(&self) -> LBKM_R { | ||
| 228 | LBKM_R::new(((self.bits >> 30) & 0x01) != 0) | ||
| 229 | } | ||
| 230 | #[doc = "Bits 24:25 - SJW"] | ||
| 231 | #[inline(always)] | ||
| 232 | pub fn sjw(&self) -> SJW_R { | ||
| 233 | SJW_R::new(((self.bits >> 24) & 0x03) as u8) | ||
| 234 | } | ||
| 235 | #[doc = "Bits 20:22 - TS2"] | ||
| 236 | #[inline(always)] | ||
| 237 | pub fn ts2(&self) -> TS2_R { | ||
| 238 | TS2_R::new(((self.bits >> 20) & 0x07) as u8) | ||
| 239 | } | ||
| 240 | #[doc = "Bits 16:19 - TS1"] | ||
| 241 | #[inline(always)] | ||
| 242 | pub fn ts1(&self) -> TS1_R { | ||
| 243 | TS1_R::new(((self.bits >> 16) & 0x0f) as u8) | ||
| 244 | } | ||
| 245 | #[doc = "Bits 0:9 - BRP"] | ||
| 246 | #[inline(always)] | ||
| 247 | pub fn brp(&self) -> BRP_R { | ||
| 248 | BRP_R::new((self.bits & 0x03ff) as u16) | ||
| 249 | } | ||
| 250 | } | ||
| 251 | impl W { | ||
| 252 | #[doc = "Bit 31 - SILM"] | ||
| 253 | #[inline(always)] | ||
| 254 | pub fn silm(&mut self) -> SILM_W { | ||
| 255 | SILM_W { w: self } | ||
| 256 | } | ||
| 257 | #[doc = "Bit 30 - LBKM"] | ||
| 258 | #[inline(always)] | ||
| 259 | pub fn lbkm(&mut self) -> LBKM_W { | ||
| 260 | LBKM_W { w: self } | ||
| 261 | } | ||
| 262 | #[doc = "Bits 24:25 - SJW"] | ||
| 263 | #[inline(always)] | ||
| 264 | pub fn sjw(&mut self) -> SJW_W { | ||
| 265 | SJW_W { w: self } | ||
| 266 | } | ||
| 267 | #[doc = "Bits 20:22 - TS2"] | ||
| 268 | #[inline(always)] | ||
| 269 | pub fn ts2(&mut self) -> TS2_W { | ||
| 270 | TS2_W { w: self } | ||
| 271 | } | ||
| 272 | #[doc = "Bits 16:19 - TS1"] | ||
| 273 | #[inline(always)] | ||
| 274 | pub fn ts1(&mut self) -> TS1_W { | ||
| 275 | TS1_W { w: self } | ||
| 276 | } | ||
| 277 | #[doc = "Bits 0:9 - BRP"] | ||
| 278 | #[inline(always)] | ||
| 279 | pub fn brp(&mut self) -> BRP_W { | ||
| 280 | BRP_W { w: self } | ||
| 281 | } | ||
| 282 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/esr.rs b/embassy-stm32/src/can/bx/pac/can/esr.rs deleted file mode 100644 index ddc414239..000000000 --- a/embassy-stm32/src/can/bx/pac/can/esr.rs +++ /dev/null | |||
| @@ -1,206 +0,0 @@ | |||
| 1 | #[doc = "Reader of register ESR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::ESR>; | ||
| 3 | #[doc = "Writer for register ESR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::ESR>; | ||
| 5 | #[doc = "Register ESR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::ESR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `REC`"] | ||
| 14 | pub type REC_R = crate::can::bx::R<u8, u8>; | ||
| 15 | #[doc = "Reader of field `TEC`"] | ||
| 16 | pub type TEC_R = crate::can::bx::R<u8, u8>; | ||
| 17 | #[doc = "LEC\n\nValue on reset: 0"] | ||
| 18 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 19 | #[repr(u8)] | ||
| 20 | pub enum LEC_A { | ||
| 21 | #[doc = "0: No Error"] | ||
| 22 | NOERROR = 0, | ||
| 23 | #[doc = "1: Stuff Error"] | ||
| 24 | STUFF = 1, | ||
| 25 | #[doc = "2: Form Error"] | ||
| 26 | FORM = 2, | ||
| 27 | #[doc = "3: Acknowledgment Error"] | ||
| 28 | ACK = 3, | ||
| 29 | #[doc = "4: Bit recessive Error"] | ||
| 30 | BITRECESSIVE = 4, | ||
| 31 | #[doc = "5: Bit dominant Error"] | ||
| 32 | BITDOMINANT = 5, | ||
| 33 | #[doc = "6: CRC Error"] | ||
| 34 | CRC = 6, | ||
| 35 | #[doc = "7: Set by software"] | ||
| 36 | CUSTOM = 7, | ||
| 37 | } | ||
| 38 | impl From<LEC_A> for u8 { | ||
| 39 | #[inline(always)] | ||
| 40 | fn from(variant: LEC_A) -> Self { | ||
| 41 | variant as _ | ||
| 42 | } | ||
| 43 | } | ||
| 44 | #[doc = "Reader of field `LEC`"] | ||
| 45 | pub type LEC_R = crate::can::bx::R<u8, LEC_A>; | ||
| 46 | impl LEC_R { | ||
| 47 | #[doc = r"Get enumerated values variant"] | ||
| 48 | #[inline(always)] | ||
| 49 | pub fn variant(&self) -> LEC_A { | ||
| 50 | match self.bits { | ||
| 51 | 0 => LEC_A::NOERROR, | ||
| 52 | 1 => LEC_A::STUFF, | ||
| 53 | 2 => LEC_A::FORM, | ||
| 54 | 3 => LEC_A::ACK, | ||
| 55 | 4 => LEC_A::BITRECESSIVE, | ||
| 56 | 5 => LEC_A::BITDOMINANT, | ||
| 57 | 6 => LEC_A::CRC, | ||
| 58 | 7 => LEC_A::CUSTOM, | ||
| 59 | _ => unreachable!(), | ||
| 60 | } | ||
| 61 | } | ||
| 62 | #[doc = "Checks if the value of the field is `NOERROR`"] | ||
| 63 | #[inline(always)] | ||
| 64 | pub fn is_no_error(&self) -> bool { | ||
| 65 | *self == LEC_A::NOERROR | ||
| 66 | } | ||
| 67 | #[doc = "Checks if the value of the field is `STUFF`"] | ||
| 68 | #[inline(always)] | ||
| 69 | pub fn is_stuff(&self) -> bool { | ||
| 70 | *self == LEC_A::STUFF | ||
| 71 | } | ||
| 72 | #[doc = "Checks if the value of the field is `FORM`"] | ||
| 73 | #[inline(always)] | ||
| 74 | pub fn is_form(&self) -> bool { | ||
| 75 | *self == LEC_A::FORM | ||
| 76 | } | ||
| 77 | #[doc = "Checks if the value of the field is `ACK`"] | ||
| 78 | #[inline(always)] | ||
| 79 | pub fn is_ack(&self) -> bool { | ||
| 80 | *self == LEC_A::ACK | ||
| 81 | } | ||
| 82 | #[doc = "Checks if the value of the field is `BITRECESSIVE`"] | ||
| 83 | #[inline(always)] | ||
| 84 | pub fn is_bit_recessive(&self) -> bool { | ||
| 85 | *self == LEC_A::BITRECESSIVE | ||
| 86 | } | ||
| 87 | #[doc = "Checks if the value of the field is `BITDOMINANT`"] | ||
| 88 | #[inline(always)] | ||
| 89 | pub fn is_bit_dominant(&self) -> bool { | ||
| 90 | *self == LEC_A::BITDOMINANT | ||
| 91 | } | ||
| 92 | #[doc = "Checks if the value of the field is `CRC`"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn is_crc(&self) -> bool { | ||
| 95 | *self == LEC_A::CRC | ||
| 96 | } | ||
| 97 | #[doc = "Checks if the value of the field is `CUSTOM`"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn is_custom(&self) -> bool { | ||
| 100 | *self == LEC_A::CUSTOM | ||
| 101 | } | ||
| 102 | } | ||
| 103 | #[doc = "Write proxy for field `LEC`"] | ||
| 104 | pub struct LEC_W<'a> { | ||
| 105 | w: &'a mut W, | ||
| 106 | } | ||
| 107 | impl<'a> LEC_W<'a> { | ||
| 108 | #[doc = r"Writes `variant` to the field"] | ||
| 109 | #[inline(always)] | ||
| 110 | pub fn variant(self, variant: LEC_A) -> &'a mut W { | ||
| 111 | { | ||
| 112 | self.bits(variant.into()) | ||
| 113 | } | ||
| 114 | } | ||
| 115 | #[doc = "No Error"] | ||
| 116 | #[inline(always)] | ||
| 117 | pub fn no_error(self) -> &'a mut W { | ||
| 118 | self.variant(LEC_A::NOERROR) | ||
| 119 | } | ||
| 120 | #[doc = "Stuff Error"] | ||
| 121 | #[inline(always)] | ||
| 122 | pub fn stuff(self) -> &'a mut W { | ||
| 123 | self.variant(LEC_A::STUFF) | ||
| 124 | } | ||
| 125 | #[doc = "Form Error"] | ||
| 126 | #[inline(always)] | ||
| 127 | pub fn form(self) -> &'a mut W { | ||
| 128 | self.variant(LEC_A::FORM) | ||
| 129 | } | ||
| 130 | #[doc = "Acknowledgment Error"] | ||
| 131 | #[inline(always)] | ||
| 132 | pub fn ack(self) -> &'a mut W { | ||
| 133 | self.variant(LEC_A::ACK) | ||
| 134 | } | ||
| 135 | #[doc = "Bit recessive Error"] | ||
| 136 | #[inline(always)] | ||
| 137 | pub fn bit_recessive(self) -> &'a mut W { | ||
| 138 | self.variant(LEC_A::BITRECESSIVE) | ||
| 139 | } | ||
| 140 | #[doc = "Bit dominant Error"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn bit_dominant(self) -> &'a mut W { | ||
| 143 | self.variant(LEC_A::BITDOMINANT) | ||
| 144 | } | ||
| 145 | #[doc = "CRC Error"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn crc(self) -> &'a mut W { | ||
| 148 | self.variant(LEC_A::CRC) | ||
| 149 | } | ||
| 150 | #[doc = "Set by software"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn custom(self) -> &'a mut W { | ||
| 153 | self.variant(LEC_A::CUSTOM) | ||
| 154 | } | ||
| 155 | #[doc = r"Writes raw bits to the field"] | ||
| 156 | #[inline(always)] | ||
| 157 | pub fn bits(self, value: u8) -> &'a mut W { | ||
| 158 | self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4); | ||
| 159 | self.w | ||
| 160 | } | ||
| 161 | } | ||
| 162 | #[doc = "Reader of field `BOFF`"] | ||
| 163 | pub type BOFF_R = crate::can::bx::R<bool, bool>; | ||
| 164 | #[doc = "Reader of field `EPVF`"] | ||
| 165 | pub type EPVF_R = crate::can::bx::R<bool, bool>; | ||
| 166 | #[doc = "Reader of field `EWGF`"] | ||
| 167 | pub type EWGF_R = crate::can::bx::R<bool, bool>; | ||
| 168 | impl R { | ||
| 169 | #[doc = "Bits 24:31 - REC"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn rec(&self) -> REC_R { | ||
| 172 | REC_R::new(((self.bits >> 24) & 0xff) as u8) | ||
| 173 | } | ||
| 174 | #[doc = "Bits 16:23 - TEC"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn tec(&self) -> TEC_R { | ||
| 177 | TEC_R::new(((self.bits >> 16) & 0xff) as u8) | ||
| 178 | } | ||
| 179 | #[doc = "Bits 4:6 - LEC"] | ||
| 180 | #[inline(always)] | ||
| 181 | pub fn lec(&self) -> LEC_R { | ||
| 182 | LEC_R::new(((self.bits >> 4) & 0x07) as u8) | ||
| 183 | } | ||
| 184 | #[doc = "Bit 2 - BOFF"] | ||
| 185 | #[inline(always)] | ||
| 186 | pub fn boff(&self) -> BOFF_R { | ||
| 187 | BOFF_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 188 | } | ||
| 189 | #[doc = "Bit 1 - EPVF"] | ||
| 190 | #[inline(always)] | ||
| 191 | pub fn epvf(&self) -> EPVF_R { | ||
| 192 | EPVF_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 193 | } | ||
| 194 | #[doc = "Bit 0 - EWGF"] | ||
| 195 | #[inline(always)] | ||
| 196 | pub fn ewgf(&self) -> EWGF_R { | ||
| 197 | EWGF_R::new((self.bits & 0x01) != 0) | ||
| 198 | } | ||
| 199 | } | ||
| 200 | impl W { | ||
| 201 | #[doc = "Bits 4:6 - LEC"] | ||
| 202 | #[inline(always)] | ||
| 203 | pub fn lec(&mut self) -> LEC_W { | ||
| 204 | LEC_W { w: self } | ||
| 205 | } | ||
| 206 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fa1r.rs b/embassy-stm32/src/can/bx/pac/can/fa1r.rs deleted file mode 100644 index e7b2b365d..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fa1r.rs +++ /dev/null | |||
| @@ -1,492 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FA1R"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FA1R>; | ||
| 3 | #[doc = "Writer for register FA1R"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FA1R>; | ||
| 5 | #[doc = "Register FA1R `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FA1R { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FACT0`"] | ||
| 14 | pub type FACT0_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Write proxy for field `FACT0`"] | ||
| 16 | pub struct FACT0_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FACT0_W<'a> { | ||
| 20 | #[doc = r"Sets the field bit"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn set_bit(self) -> &'a mut W { | ||
| 23 | self.bit(true) | ||
| 24 | } | ||
| 25 | #[doc = r"Clears the field bit"] | ||
| 26 | #[inline(always)] | ||
| 27 | pub fn clear_bit(self) -> &'a mut W { | ||
| 28 | self.bit(false) | ||
| 29 | } | ||
| 30 | #[doc = r"Writes raw bits to the field"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 33 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 34 | self.w | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Reader of field `FACT1`"] | ||
| 38 | pub type FACT1_R = crate::can::bx::R<bool, bool>; | ||
| 39 | #[doc = "Write proxy for field `FACT1`"] | ||
| 40 | pub struct FACT1_W<'a> { | ||
| 41 | w: &'a mut W, | ||
| 42 | } | ||
| 43 | impl<'a> FACT1_W<'a> { | ||
| 44 | #[doc = r"Sets the field bit"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn set_bit(self) -> &'a mut W { | ||
| 47 | self.bit(true) | ||
| 48 | } | ||
| 49 | #[doc = r"Clears the field bit"] | ||
| 50 | #[inline(always)] | ||
| 51 | pub fn clear_bit(self) -> &'a mut W { | ||
| 52 | self.bit(false) | ||
| 53 | } | ||
| 54 | #[doc = r"Writes raw bits to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 57 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 58 | self.w | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Reader of field `FACT2`"] | ||
| 62 | pub type FACT2_R = crate::can::bx::R<bool, bool>; | ||
| 63 | #[doc = "Write proxy for field `FACT2`"] | ||
| 64 | pub struct FACT2_W<'a> { | ||
| 65 | w: &'a mut W, | ||
| 66 | } | ||
| 67 | impl<'a> FACT2_W<'a> { | ||
| 68 | #[doc = r"Sets the field bit"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn set_bit(self) -> &'a mut W { | ||
| 71 | self.bit(true) | ||
| 72 | } | ||
| 73 | #[doc = r"Clears the field bit"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn clear_bit(self) -> &'a mut W { | ||
| 76 | self.bit(false) | ||
| 77 | } | ||
| 78 | #[doc = r"Writes raw bits to the field"] | ||
| 79 | #[inline(always)] | ||
| 80 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 81 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 82 | self.w | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #[doc = "Reader of field `FACT3`"] | ||
| 86 | pub type FACT3_R = crate::can::bx::R<bool, bool>; | ||
| 87 | #[doc = "Write proxy for field `FACT3`"] | ||
| 88 | pub struct FACT3_W<'a> { | ||
| 89 | w: &'a mut W, | ||
| 90 | } | ||
| 91 | impl<'a> FACT3_W<'a> { | ||
| 92 | #[doc = r"Sets the field bit"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn set_bit(self) -> &'a mut W { | ||
| 95 | self.bit(true) | ||
| 96 | } | ||
| 97 | #[doc = r"Clears the field bit"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn clear_bit(self) -> &'a mut W { | ||
| 100 | self.bit(false) | ||
| 101 | } | ||
| 102 | #[doc = r"Writes raw bits to the field"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 105 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 106 | self.w | ||
| 107 | } | ||
| 108 | } | ||
| 109 | #[doc = "Reader of field `FACT4`"] | ||
| 110 | pub type FACT4_R = crate::can::bx::R<bool, bool>; | ||
| 111 | #[doc = "Write proxy for field `FACT4`"] | ||
| 112 | pub struct FACT4_W<'a> { | ||
| 113 | w: &'a mut W, | ||
| 114 | } | ||
| 115 | impl<'a> FACT4_W<'a> { | ||
| 116 | #[doc = r"Sets the field bit"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn set_bit(self) -> &'a mut W { | ||
| 119 | self.bit(true) | ||
| 120 | } | ||
| 121 | #[doc = r"Clears the field bit"] | ||
| 122 | #[inline(always)] | ||
| 123 | pub fn clear_bit(self) -> &'a mut W { | ||
| 124 | self.bit(false) | ||
| 125 | } | ||
| 126 | #[doc = r"Writes raw bits to the field"] | ||
| 127 | #[inline(always)] | ||
| 128 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 129 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 130 | self.w | ||
| 131 | } | ||
| 132 | } | ||
| 133 | #[doc = "Reader of field `FACT5`"] | ||
| 134 | pub type FACT5_R = crate::can::bx::R<bool, bool>; | ||
| 135 | #[doc = "Write proxy for field `FACT5`"] | ||
| 136 | pub struct FACT5_W<'a> { | ||
| 137 | w: &'a mut W, | ||
| 138 | } | ||
| 139 | impl<'a> FACT5_W<'a> { | ||
| 140 | #[doc = r"Sets the field bit"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn set_bit(self) -> &'a mut W { | ||
| 143 | self.bit(true) | ||
| 144 | } | ||
| 145 | #[doc = r"Clears the field bit"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn clear_bit(self) -> &'a mut W { | ||
| 148 | self.bit(false) | ||
| 149 | } | ||
| 150 | #[doc = r"Writes raw bits to the field"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 153 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 154 | self.w | ||
| 155 | } | ||
| 156 | } | ||
| 157 | #[doc = "Reader of field `FACT6`"] | ||
| 158 | pub type FACT6_R = crate::can::bx::R<bool, bool>; | ||
| 159 | #[doc = "Write proxy for field `FACT6`"] | ||
| 160 | pub struct FACT6_W<'a> { | ||
| 161 | w: &'a mut W, | ||
| 162 | } | ||
| 163 | impl<'a> FACT6_W<'a> { | ||
| 164 | #[doc = r"Sets the field bit"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn set_bit(self) -> &'a mut W { | ||
| 167 | self.bit(true) | ||
| 168 | } | ||
| 169 | #[doc = r"Clears the field bit"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn clear_bit(self) -> &'a mut W { | ||
| 172 | self.bit(false) | ||
| 173 | } | ||
| 174 | #[doc = r"Writes raw bits to the field"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 177 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 178 | self.w | ||
| 179 | } | ||
| 180 | } | ||
| 181 | #[doc = "Reader of field `FACT7`"] | ||
| 182 | pub type FACT7_R = crate::can::bx::R<bool, bool>; | ||
| 183 | #[doc = "Write proxy for field `FACT7`"] | ||
| 184 | pub struct FACT7_W<'a> { | ||
| 185 | w: &'a mut W, | ||
| 186 | } | ||
| 187 | impl<'a> FACT7_W<'a> { | ||
| 188 | #[doc = r"Sets the field bit"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn set_bit(self) -> &'a mut W { | ||
| 191 | self.bit(true) | ||
| 192 | } | ||
| 193 | #[doc = r"Clears the field bit"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn clear_bit(self) -> &'a mut W { | ||
| 196 | self.bit(false) | ||
| 197 | } | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `FACT8`"] | ||
| 206 | pub type FACT8_R = crate::can::bx::R<bool, bool>; | ||
| 207 | #[doc = "Write proxy for field `FACT8`"] | ||
| 208 | pub struct FACT8_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> FACT8_W<'a> { | ||
| 212 | #[doc = r"Sets the field bit"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn set_bit(self) -> &'a mut W { | ||
| 215 | self.bit(true) | ||
| 216 | } | ||
| 217 | #[doc = r"Clears the field bit"] | ||
| 218 | #[inline(always)] | ||
| 219 | pub fn clear_bit(self) -> &'a mut W { | ||
| 220 | self.bit(false) | ||
| 221 | } | ||
| 222 | #[doc = r"Writes raw bits to the field"] | ||
| 223 | #[inline(always)] | ||
| 224 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 225 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 226 | self.w | ||
| 227 | } | ||
| 228 | } | ||
| 229 | #[doc = "Reader of field `FACT9`"] | ||
| 230 | pub type FACT9_R = crate::can::bx::R<bool, bool>; | ||
| 231 | #[doc = "Write proxy for field `FACT9`"] | ||
| 232 | pub struct FACT9_W<'a> { | ||
| 233 | w: &'a mut W, | ||
| 234 | } | ||
| 235 | impl<'a> FACT9_W<'a> { | ||
| 236 | #[doc = r"Sets the field bit"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn set_bit(self) -> &'a mut W { | ||
| 239 | self.bit(true) | ||
| 240 | } | ||
| 241 | #[doc = r"Clears the field bit"] | ||
| 242 | #[inline(always)] | ||
| 243 | pub fn clear_bit(self) -> &'a mut W { | ||
| 244 | self.bit(false) | ||
| 245 | } | ||
| 246 | #[doc = r"Writes raw bits to the field"] | ||
| 247 | #[inline(always)] | ||
| 248 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 249 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 250 | self.w | ||
| 251 | } | ||
| 252 | } | ||
| 253 | #[doc = "Reader of field `FACT10`"] | ||
| 254 | pub type FACT10_R = crate::can::bx::R<bool, bool>; | ||
| 255 | #[doc = "Write proxy for field `FACT10`"] | ||
| 256 | pub struct FACT10_W<'a> { | ||
| 257 | w: &'a mut W, | ||
| 258 | } | ||
| 259 | impl<'a> FACT10_W<'a> { | ||
| 260 | #[doc = r"Sets the field bit"] | ||
| 261 | #[inline(always)] | ||
| 262 | pub fn set_bit(self) -> &'a mut W { | ||
| 263 | self.bit(true) | ||
| 264 | } | ||
| 265 | #[doc = r"Clears the field bit"] | ||
| 266 | #[inline(always)] | ||
| 267 | pub fn clear_bit(self) -> &'a mut W { | ||
| 268 | self.bit(false) | ||
| 269 | } | ||
| 270 | #[doc = r"Writes raw bits to the field"] | ||
| 271 | #[inline(always)] | ||
| 272 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 273 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 274 | self.w | ||
| 275 | } | ||
| 276 | } | ||
| 277 | #[doc = "Reader of field `FACT11`"] | ||
| 278 | pub type FACT11_R = crate::can::bx::R<bool, bool>; | ||
| 279 | #[doc = "Write proxy for field `FACT11`"] | ||
| 280 | pub struct FACT11_W<'a> { | ||
| 281 | w: &'a mut W, | ||
| 282 | } | ||
| 283 | impl<'a> FACT11_W<'a> { | ||
| 284 | #[doc = r"Sets the field bit"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn set_bit(self) -> &'a mut W { | ||
| 287 | self.bit(true) | ||
| 288 | } | ||
| 289 | #[doc = r"Clears the field bit"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn clear_bit(self) -> &'a mut W { | ||
| 292 | self.bit(false) | ||
| 293 | } | ||
| 294 | #[doc = r"Writes raw bits to the field"] | ||
| 295 | #[inline(always)] | ||
| 296 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 297 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 298 | self.w | ||
| 299 | } | ||
| 300 | } | ||
| 301 | #[doc = "Reader of field `FACT12`"] | ||
| 302 | pub type FACT12_R = crate::can::bx::R<bool, bool>; | ||
| 303 | #[doc = "Write proxy for field `FACT12`"] | ||
| 304 | pub struct FACT12_W<'a> { | ||
| 305 | w: &'a mut W, | ||
| 306 | } | ||
| 307 | impl<'a> FACT12_W<'a> { | ||
| 308 | #[doc = r"Sets the field bit"] | ||
| 309 | #[inline(always)] | ||
| 310 | pub fn set_bit(self) -> &'a mut W { | ||
| 311 | self.bit(true) | ||
| 312 | } | ||
| 313 | #[doc = r"Clears the field bit"] | ||
| 314 | #[inline(always)] | ||
| 315 | pub fn clear_bit(self) -> &'a mut W { | ||
| 316 | self.bit(false) | ||
| 317 | } | ||
| 318 | #[doc = r"Writes raw bits to the field"] | ||
| 319 | #[inline(always)] | ||
| 320 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 321 | self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); | ||
| 322 | self.w | ||
| 323 | } | ||
| 324 | } | ||
| 325 | #[doc = "Reader of field `FACT13`"] | ||
| 326 | pub type FACT13_R = crate::can::bx::R<bool, bool>; | ||
| 327 | #[doc = "Write proxy for field `FACT13`"] | ||
| 328 | pub struct FACT13_W<'a> { | ||
| 329 | w: &'a mut W, | ||
| 330 | } | ||
| 331 | impl<'a> FACT13_W<'a> { | ||
| 332 | #[doc = r"Sets the field bit"] | ||
| 333 | #[inline(always)] | ||
| 334 | pub fn set_bit(self) -> &'a mut W { | ||
| 335 | self.bit(true) | ||
| 336 | } | ||
| 337 | #[doc = r"Clears the field bit"] | ||
| 338 | #[inline(always)] | ||
| 339 | pub fn clear_bit(self) -> &'a mut W { | ||
| 340 | self.bit(false) | ||
| 341 | } | ||
| 342 | #[doc = r"Writes raw bits to the field"] | ||
| 343 | #[inline(always)] | ||
| 344 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 345 | self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); | ||
| 346 | self.w | ||
| 347 | } | ||
| 348 | } | ||
| 349 | impl R { | ||
| 350 | #[doc = "Bit 0 - Filter active"] | ||
| 351 | #[inline(always)] | ||
| 352 | pub fn fact0(&self) -> FACT0_R { | ||
| 353 | FACT0_R::new((self.bits & 0x01) != 0) | ||
| 354 | } | ||
| 355 | #[doc = "Bit 1 - Filter active"] | ||
| 356 | #[inline(always)] | ||
| 357 | pub fn fact1(&self) -> FACT1_R { | ||
| 358 | FACT1_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 359 | } | ||
| 360 | #[doc = "Bit 2 - Filter active"] | ||
| 361 | #[inline(always)] | ||
| 362 | pub fn fact2(&self) -> FACT2_R { | ||
| 363 | FACT2_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 364 | } | ||
| 365 | #[doc = "Bit 3 - Filter active"] | ||
| 366 | #[inline(always)] | ||
| 367 | pub fn fact3(&self) -> FACT3_R { | ||
| 368 | FACT3_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 369 | } | ||
| 370 | #[doc = "Bit 4 - Filter active"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn fact4(&self) -> FACT4_R { | ||
| 373 | FACT4_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 374 | } | ||
| 375 | #[doc = "Bit 5 - Filter active"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn fact5(&self) -> FACT5_R { | ||
| 378 | FACT5_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 379 | } | ||
| 380 | #[doc = "Bit 6 - Filter active"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn fact6(&self) -> FACT6_R { | ||
| 383 | FACT6_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 384 | } | ||
| 385 | #[doc = "Bit 7 - Filter active"] | ||
| 386 | #[inline(always)] | ||
| 387 | pub fn fact7(&self) -> FACT7_R { | ||
| 388 | FACT7_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 389 | } | ||
| 390 | #[doc = "Bit 8 - Filter active"] | ||
| 391 | #[inline(always)] | ||
| 392 | pub fn fact8(&self) -> FACT8_R { | ||
| 393 | FACT8_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 394 | } | ||
| 395 | #[doc = "Bit 9 - Filter active"] | ||
| 396 | #[inline(always)] | ||
| 397 | pub fn fact9(&self) -> FACT9_R { | ||
| 398 | FACT9_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 399 | } | ||
| 400 | #[doc = "Bit 10 - Filter active"] | ||
| 401 | #[inline(always)] | ||
| 402 | pub fn fact10(&self) -> FACT10_R { | ||
| 403 | FACT10_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 404 | } | ||
| 405 | #[doc = "Bit 11 - Filter active"] | ||
| 406 | #[inline(always)] | ||
| 407 | pub fn fact11(&self) -> FACT11_R { | ||
| 408 | FACT11_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 409 | } | ||
| 410 | #[doc = "Bit 12 - Filter active"] | ||
| 411 | #[inline(always)] | ||
| 412 | pub fn fact12(&self) -> FACT12_R { | ||
| 413 | FACT12_R::new(((self.bits >> 12) & 0x01) != 0) | ||
| 414 | } | ||
| 415 | #[doc = "Bit 13 - Filter active"] | ||
| 416 | #[inline(always)] | ||
| 417 | pub fn fact13(&self) -> FACT13_R { | ||
| 418 | FACT13_R::new(((self.bits >> 13) & 0x01) != 0) | ||
| 419 | } | ||
| 420 | } | ||
| 421 | impl W { | ||
| 422 | #[doc = "Bit 0 - Filter active"] | ||
| 423 | #[inline(always)] | ||
| 424 | pub fn fact0(&mut self) -> FACT0_W { | ||
| 425 | FACT0_W { w: self } | ||
| 426 | } | ||
| 427 | #[doc = "Bit 1 - Filter active"] | ||
| 428 | #[inline(always)] | ||
| 429 | pub fn fact1(&mut self) -> FACT1_W { | ||
| 430 | FACT1_W { w: self } | ||
| 431 | } | ||
| 432 | #[doc = "Bit 2 - Filter active"] | ||
| 433 | #[inline(always)] | ||
| 434 | pub fn fact2(&mut self) -> FACT2_W { | ||
| 435 | FACT2_W { w: self } | ||
| 436 | } | ||
| 437 | #[doc = "Bit 3 - Filter active"] | ||
| 438 | #[inline(always)] | ||
| 439 | pub fn fact3(&mut self) -> FACT3_W { | ||
| 440 | FACT3_W { w: self } | ||
| 441 | } | ||
| 442 | #[doc = "Bit 4 - Filter active"] | ||
| 443 | #[inline(always)] | ||
| 444 | pub fn fact4(&mut self) -> FACT4_W { | ||
| 445 | FACT4_W { w: self } | ||
| 446 | } | ||
| 447 | #[doc = "Bit 5 - Filter active"] | ||
| 448 | #[inline(always)] | ||
| 449 | pub fn fact5(&mut self) -> FACT5_W { | ||
| 450 | FACT5_W { w: self } | ||
| 451 | } | ||
| 452 | #[doc = "Bit 6 - Filter active"] | ||
| 453 | #[inline(always)] | ||
| 454 | pub fn fact6(&mut self) -> FACT6_W { | ||
| 455 | FACT6_W { w: self } | ||
| 456 | } | ||
| 457 | #[doc = "Bit 7 - Filter active"] | ||
| 458 | #[inline(always)] | ||
| 459 | pub fn fact7(&mut self) -> FACT7_W { | ||
| 460 | FACT7_W { w: self } | ||
| 461 | } | ||
| 462 | #[doc = "Bit 8 - Filter active"] | ||
| 463 | #[inline(always)] | ||
| 464 | pub fn fact8(&mut self) -> FACT8_W { | ||
| 465 | FACT8_W { w: self } | ||
| 466 | } | ||
| 467 | #[doc = "Bit 9 - Filter active"] | ||
| 468 | #[inline(always)] | ||
| 469 | pub fn fact9(&mut self) -> FACT9_W { | ||
| 470 | FACT9_W { w: self } | ||
| 471 | } | ||
| 472 | #[doc = "Bit 10 - Filter active"] | ||
| 473 | #[inline(always)] | ||
| 474 | pub fn fact10(&mut self) -> FACT10_W { | ||
| 475 | FACT10_W { w: self } | ||
| 476 | } | ||
| 477 | #[doc = "Bit 11 - Filter active"] | ||
| 478 | #[inline(always)] | ||
| 479 | pub fn fact11(&mut self) -> FACT11_W { | ||
| 480 | FACT11_W { w: self } | ||
| 481 | } | ||
| 482 | #[doc = "Bit 12 - Filter active"] | ||
| 483 | #[inline(always)] | ||
| 484 | pub fn fact12(&mut self) -> FACT12_W { | ||
| 485 | FACT12_W { w: self } | ||
| 486 | } | ||
| 487 | #[doc = "Bit 13 - Filter active"] | ||
| 488 | #[inline(always)] | ||
| 489 | pub fn fact13(&mut self) -> FACT13_W { | ||
| 490 | FACT13_W { w: self } | ||
| 491 | } | ||
| 492 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fb.rs b/embassy-stm32/src/can/bx/pac/can/fb.rs deleted file mode 100644 index 527235b29..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fb.rs +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | #[doc = "Filter bank 0 register 1\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fr1](fr1) module"] | ||
| 2 | pub type FR1 = crate::can::bx::Reg<u32, _FR1>; | ||
| 3 | #[allow(missing_docs)] | ||
| 4 | #[doc(hidden)] | ||
| 5 | pub struct _FR1; | ||
| 6 | #[doc = "`read()` method returns [fr1::R](fr1::R) reader structure"] | ||
| 7 | impl crate::can::bx::Readable for FR1 {} | ||
| 8 | #[doc = "`write(|w| ..)` method takes [fr1::W](fr1::W) writer structure"] | ||
| 9 | impl crate::can::bx::Writable for FR1 {} | ||
| 10 | #[doc = "Filter bank 0 register 1"] | ||
| 11 | pub mod fr1; | ||
| 12 | #[doc = "Filter bank 0 register 2\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fr2](fr2) module"] | ||
| 13 | pub type FR2 = crate::can::bx::Reg<u32, _FR2>; | ||
| 14 | #[allow(missing_docs)] | ||
| 15 | #[doc(hidden)] | ||
| 16 | pub struct _FR2; | ||
| 17 | #[doc = "`read()` method returns [fr2::R](fr2::R) reader structure"] | ||
| 18 | impl crate::can::bx::Readable for FR2 {} | ||
| 19 | #[doc = "`write(|w| ..)` method takes [fr2::W](fr2::W) writer structure"] | ||
| 20 | impl crate::can::bx::Writable for FR2 {} | ||
| 21 | #[doc = "Filter bank 0 register 2"] | ||
| 22 | pub mod fr2; | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fb/fr1.rs b/embassy-stm32/src/can/bx/pac/can/fb/fr1.rs deleted file mode 100644 index 6a80bd308..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fb/fr1.rs +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FR1"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FR1>; | ||
| 3 | #[doc = "Writer for register FR1"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FR1>; | ||
| 5 | #[doc = "Register FR1 `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FR1 { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FB`"] | ||
| 14 | pub type FB_R = crate::can::bx::R<u32, u32>; | ||
| 15 | #[doc = "Write proxy for field `FB`"] | ||
| 16 | pub struct FB_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FB_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u32) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | impl R { | ||
| 28 | #[doc = "Bits 0:31 - Filter bits"] | ||
| 29 | #[inline(always)] | ||
| 30 | pub fn fb(&self) -> FB_R { | ||
| 31 | FB_R::new((self.bits & 0xffff_ffff) as u32) | ||
| 32 | } | ||
| 33 | } | ||
| 34 | impl W { | ||
| 35 | #[doc = "Bits 0:31 - Filter bits"] | ||
| 36 | #[inline(always)] | ||
| 37 | pub fn fb(&mut self) -> FB_W { | ||
| 38 | FB_W { w: self } | ||
| 39 | } | ||
| 40 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fb/fr2.rs b/embassy-stm32/src/can/bx/pac/can/fb/fr2.rs deleted file mode 100644 index 097387b9f..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fb/fr2.rs +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FR2"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FR2>; | ||
| 3 | #[doc = "Writer for register FR2"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FR2>; | ||
| 5 | #[doc = "Register FR2 `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FR2 { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FB`"] | ||
| 14 | pub type FB_R = crate::can::bx::R<u32, u32>; | ||
| 15 | #[doc = "Write proxy for field `FB`"] | ||
| 16 | pub struct FB_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FB_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u32) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | impl R { | ||
| 28 | #[doc = "Bits 0:31 - Filter bits"] | ||
| 29 | #[inline(always)] | ||
| 30 | pub fn fb(&self) -> FB_R { | ||
| 31 | FB_R::new((self.bits & 0xffff_ffff) as u32) | ||
| 32 | } | ||
| 33 | } | ||
| 34 | impl W { | ||
| 35 | #[doc = "Bits 0:31 - Filter bits"] | ||
| 36 | #[inline(always)] | ||
| 37 | pub fn fb(&mut self) -> FB_W { | ||
| 38 | FB_W { w: self } | ||
| 39 | } | ||
| 40 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/ffa1r.rs b/embassy-stm32/src/can/bx/pac/can/ffa1r.rs deleted file mode 100644 index cf5e04c78..000000000 --- a/embassy-stm32/src/can/bx/pac/can/ffa1r.rs +++ /dev/null | |||
| @@ -1,492 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FFA1R"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FFA1R>; | ||
| 3 | #[doc = "Writer for register FFA1R"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FFA1R>; | ||
| 5 | #[doc = "Register FFA1R `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FFA1R { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FFA0`"] | ||
| 14 | pub type FFA0_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Write proxy for field `FFA0`"] | ||
| 16 | pub struct FFA0_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FFA0_W<'a> { | ||
| 20 | #[doc = r"Sets the field bit"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn set_bit(self) -> &'a mut W { | ||
| 23 | self.bit(true) | ||
| 24 | } | ||
| 25 | #[doc = r"Clears the field bit"] | ||
| 26 | #[inline(always)] | ||
| 27 | pub fn clear_bit(self) -> &'a mut W { | ||
| 28 | self.bit(false) | ||
| 29 | } | ||
| 30 | #[doc = r"Writes raw bits to the field"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 33 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 34 | self.w | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Reader of field `FFA1`"] | ||
| 38 | pub type FFA1_R = crate::can::bx::R<bool, bool>; | ||
| 39 | #[doc = "Write proxy for field `FFA1`"] | ||
| 40 | pub struct FFA1_W<'a> { | ||
| 41 | w: &'a mut W, | ||
| 42 | } | ||
| 43 | impl<'a> FFA1_W<'a> { | ||
| 44 | #[doc = r"Sets the field bit"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn set_bit(self) -> &'a mut W { | ||
| 47 | self.bit(true) | ||
| 48 | } | ||
| 49 | #[doc = r"Clears the field bit"] | ||
| 50 | #[inline(always)] | ||
| 51 | pub fn clear_bit(self) -> &'a mut W { | ||
| 52 | self.bit(false) | ||
| 53 | } | ||
| 54 | #[doc = r"Writes raw bits to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 57 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 58 | self.w | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Reader of field `FFA2`"] | ||
| 62 | pub type FFA2_R = crate::can::bx::R<bool, bool>; | ||
| 63 | #[doc = "Write proxy for field `FFA2`"] | ||
| 64 | pub struct FFA2_W<'a> { | ||
| 65 | w: &'a mut W, | ||
| 66 | } | ||
| 67 | impl<'a> FFA2_W<'a> { | ||
| 68 | #[doc = r"Sets the field bit"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn set_bit(self) -> &'a mut W { | ||
| 71 | self.bit(true) | ||
| 72 | } | ||
| 73 | #[doc = r"Clears the field bit"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn clear_bit(self) -> &'a mut W { | ||
| 76 | self.bit(false) | ||
| 77 | } | ||
| 78 | #[doc = r"Writes raw bits to the field"] | ||
| 79 | #[inline(always)] | ||
| 80 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 81 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 82 | self.w | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #[doc = "Reader of field `FFA3`"] | ||
| 86 | pub type FFA3_R = crate::can::bx::R<bool, bool>; | ||
| 87 | #[doc = "Write proxy for field `FFA3`"] | ||
| 88 | pub struct FFA3_W<'a> { | ||
| 89 | w: &'a mut W, | ||
| 90 | } | ||
| 91 | impl<'a> FFA3_W<'a> { | ||
| 92 | #[doc = r"Sets the field bit"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn set_bit(self) -> &'a mut W { | ||
| 95 | self.bit(true) | ||
| 96 | } | ||
| 97 | #[doc = r"Clears the field bit"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn clear_bit(self) -> &'a mut W { | ||
| 100 | self.bit(false) | ||
| 101 | } | ||
| 102 | #[doc = r"Writes raw bits to the field"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 105 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 106 | self.w | ||
| 107 | } | ||
| 108 | } | ||
| 109 | #[doc = "Reader of field `FFA4`"] | ||
| 110 | pub type FFA4_R = crate::can::bx::R<bool, bool>; | ||
| 111 | #[doc = "Write proxy for field `FFA4`"] | ||
| 112 | pub struct FFA4_W<'a> { | ||
| 113 | w: &'a mut W, | ||
| 114 | } | ||
| 115 | impl<'a> FFA4_W<'a> { | ||
| 116 | #[doc = r"Sets the field bit"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn set_bit(self) -> &'a mut W { | ||
| 119 | self.bit(true) | ||
| 120 | } | ||
| 121 | #[doc = r"Clears the field bit"] | ||
| 122 | #[inline(always)] | ||
| 123 | pub fn clear_bit(self) -> &'a mut W { | ||
| 124 | self.bit(false) | ||
| 125 | } | ||
| 126 | #[doc = r"Writes raw bits to the field"] | ||
| 127 | #[inline(always)] | ||
| 128 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 129 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 130 | self.w | ||
| 131 | } | ||
| 132 | } | ||
| 133 | #[doc = "Reader of field `FFA5`"] | ||
| 134 | pub type FFA5_R = crate::can::bx::R<bool, bool>; | ||
| 135 | #[doc = "Write proxy for field `FFA5`"] | ||
| 136 | pub struct FFA5_W<'a> { | ||
| 137 | w: &'a mut W, | ||
| 138 | } | ||
| 139 | impl<'a> FFA5_W<'a> { | ||
| 140 | #[doc = r"Sets the field bit"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn set_bit(self) -> &'a mut W { | ||
| 143 | self.bit(true) | ||
| 144 | } | ||
| 145 | #[doc = r"Clears the field bit"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn clear_bit(self) -> &'a mut W { | ||
| 148 | self.bit(false) | ||
| 149 | } | ||
| 150 | #[doc = r"Writes raw bits to the field"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 153 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 154 | self.w | ||
| 155 | } | ||
| 156 | } | ||
| 157 | #[doc = "Reader of field `FFA6`"] | ||
| 158 | pub type FFA6_R = crate::can::bx::R<bool, bool>; | ||
| 159 | #[doc = "Write proxy for field `FFA6`"] | ||
| 160 | pub struct FFA6_W<'a> { | ||
| 161 | w: &'a mut W, | ||
| 162 | } | ||
| 163 | impl<'a> FFA6_W<'a> { | ||
| 164 | #[doc = r"Sets the field bit"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn set_bit(self) -> &'a mut W { | ||
| 167 | self.bit(true) | ||
| 168 | } | ||
| 169 | #[doc = r"Clears the field bit"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn clear_bit(self) -> &'a mut W { | ||
| 172 | self.bit(false) | ||
| 173 | } | ||
| 174 | #[doc = r"Writes raw bits to the field"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 177 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 178 | self.w | ||
| 179 | } | ||
| 180 | } | ||
| 181 | #[doc = "Reader of field `FFA7`"] | ||
| 182 | pub type FFA7_R = crate::can::bx::R<bool, bool>; | ||
| 183 | #[doc = "Write proxy for field `FFA7`"] | ||
| 184 | pub struct FFA7_W<'a> { | ||
| 185 | w: &'a mut W, | ||
| 186 | } | ||
| 187 | impl<'a> FFA7_W<'a> { | ||
| 188 | #[doc = r"Sets the field bit"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn set_bit(self) -> &'a mut W { | ||
| 191 | self.bit(true) | ||
| 192 | } | ||
| 193 | #[doc = r"Clears the field bit"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn clear_bit(self) -> &'a mut W { | ||
| 196 | self.bit(false) | ||
| 197 | } | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `FFA8`"] | ||
| 206 | pub type FFA8_R = crate::can::bx::R<bool, bool>; | ||
| 207 | #[doc = "Write proxy for field `FFA8`"] | ||
| 208 | pub struct FFA8_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> FFA8_W<'a> { | ||
| 212 | #[doc = r"Sets the field bit"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn set_bit(self) -> &'a mut W { | ||
| 215 | self.bit(true) | ||
| 216 | } | ||
| 217 | #[doc = r"Clears the field bit"] | ||
| 218 | #[inline(always)] | ||
| 219 | pub fn clear_bit(self) -> &'a mut W { | ||
| 220 | self.bit(false) | ||
| 221 | } | ||
| 222 | #[doc = r"Writes raw bits to the field"] | ||
| 223 | #[inline(always)] | ||
| 224 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 225 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 226 | self.w | ||
| 227 | } | ||
| 228 | } | ||
| 229 | #[doc = "Reader of field `FFA9`"] | ||
| 230 | pub type FFA9_R = crate::can::bx::R<bool, bool>; | ||
| 231 | #[doc = "Write proxy for field `FFA9`"] | ||
| 232 | pub struct FFA9_W<'a> { | ||
| 233 | w: &'a mut W, | ||
| 234 | } | ||
| 235 | impl<'a> FFA9_W<'a> { | ||
| 236 | #[doc = r"Sets the field bit"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn set_bit(self) -> &'a mut W { | ||
| 239 | self.bit(true) | ||
| 240 | } | ||
| 241 | #[doc = r"Clears the field bit"] | ||
| 242 | #[inline(always)] | ||
| 243 | pub fn clear_bit(self) -> &'a mut W { | ||
| 244 | self.bit(false) | ||
| 245 | } | ||
| 246 | #[doc = r"Writes raw bits to the field"] | ||
| 247 | #[inline(always)] | ||
| 248 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 249 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 250 | self.w | ||
| 251 | } | ||
| 252 | } | ||
| 253 | #[doc = "Reader of field `FFA10`"] | ||
| 254 | pub type FFA10_R = crate::can::bx::R<bool, bool>; | ||
| 255 | #[doc = "Write proxy for field `FFA10`"] | ||
| 256 | pub struct FFA10_W<'a> { | ||
| 257 | w: &'a mut W, | ||
| 258 | } | ||
| 259 | impl<'a> FFA10_W<'a> { | ||
| 260 | #[doc = r"Sets the field bit"] | ||
| 261 | #[inline(always)] | ||
| 262 | pub fn set_bit(self) -> &'a mut W { | ||
| 263 | self.bit(true) | ||
| 264 | } | ||
| 265 | #[doc = r"Clears the field bit"] | ||
| 266 | #[inline(always)] | ||
| 267 | pub fn clear_bit(self) -> &'a mut W { | ||
| 268 | self.bit(false) | ||
| 269 | } | ||
| 270 | #[doc = r"Writes raw bits to the field"] | ||
| 271 | #[inline(always)] | ||
| 272 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 273 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 274 | self.w | ||
| 275 | } | ||
| 276 | } | ||
| 277 | #[doc = "Reader of field `FFA11`"] | ||
| 278 | pub type FFA11_R = crate::can::bx::R<bool, bool>; | ||
| 279 | #[doc = "Write proxy for field `FFA11`"] | ||
| 280 | pub struct FFA11_W<'a> { | ||
| 281 | w: &'a mut W, | ||
| 282 | } | ||
| 283 | impl<'a> FFA11_W<'a> { | ||
| 284 | #[doc = r"Sets the field bit"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn set_bit(self) -> &'a mut W { | ||
| 287 | self.bit(true) | ||
| 288 | } | ||
| 289 | #[doc = r"Clears the field bit"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn clear_bit(self) -> &'a mut W { | ||
| 292 | self.bit(false) | ||
| 293 | } | ||
| 294 | #[doc = r"Writes raw bits to the field"] | ||
| 295 | #[inline(always)] | ||
| 296 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 297 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 298 | self.w | ||
| 299 | } | ||
| 300 | } | ||
| 301 | #[doc = "Reader of field `FFA12`"] | ||
| 302 | pub type FFA12_R = crate::can::bx::R<bool, bool>; | ||
| 303 | #[doc = "Write proxy for field `FFA12`"] | ||
| 304 | pub struct FFA12_W<'a> { | ||
| 305 | w: &'a mut W, | ||
| 306 | } | ||
| 307 | impl<'a> FFA12_W<'a> { | ||
| 308 | #[doc = r"Sets the field bit"] | ||
| 309 | #[inline(always)] | ||
| 310 | pub fn set_bit(self) -> &'a mut W { | ||
| 311 | self.bit(true) | ||
| 312 | } | ||
| 313 | #[doc = r"Clears the field bit"] | ||
| 314 | #[inline(always)] | ||
| 315 | pub fn clear_bit(self) -> &'a mut W { | ||
| 316 | self.bit(false) | ||
| 317 | } | ||
| 318 | #[doc = r"Writes raw bits to the field"] | ||
| 319 | #[inline(always)] | ||
| 320 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 321 | self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); | ||
| 322 | self.w | ||
| 323 | } | ||
| 324 | } | ||
| 325 | #[doc = "Reader of field `FFA13`"] | ||
| 326 | pub type FFA13_R = crate::can::bx::R<bool, bool>; | ||
| 327 | #[doc = "Write proxy for field `FFA13`"] | ||
| 328 | pub struct FFA13_W<'a> { | ||
| 329 | w: &'a mut W, | ||
| 330 | } | ||
| 331 | impl<'a> FFA13_W<'a> { | ||
| 332 | #[doc = r"Sets the field bit"] | ||
| 333 | #[inline(always)] | ||
| 334 | pub fn set_bit(self) -> &'a mut W { | ||
| 335 | self.bit(true) | ||
| 336 | } | ||
| 337 | #[doc = r"Clears the field bit"] | ||
| 338 | #[inline(always)] | ||
| 339 | pub fn clear_bit(self) -> &'a mut W { | ||
| 340 | self.bit(false) | ||
| 341 | } | ||
| 342 | #[doc = r"Writes raw bits to the field"] | ||
| 343 | #[inline(always)] | ||
| 344 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 345 | self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); | ||
| 346 | self.w | ||
| 347 | } | ||
| 348 | } | ||
| 349 | impl R { | ||
| 350 | #[doc = "Bit 0 - Filter FIFO assignment for filter 0"] | ||
| 351 | #[inline(always)] | ||
| 352 | pub fn ffa0(&self) -> FFA0_R { | ||
| 353 | FFA0_R::new((self.bits & 0x01) != 0) | ||
| 354 | } | ||
| 355 | #[doc = "Bit 1 - Filter FIFO assignment for filter 1"] | ||
| 356 | #[inline(always)] | ||
| 357 | pub fn ffa1(&self) -> FFA1_R { | ||
| 358 | FFA1_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 359 | } | ||
| 360 | #[doc = "Bit 2 - Filter FIFO assignment for filter 2"] | ||
| 361 | #[inline(always)] | ||
| 362 | pub fn ffa2(&self) -> FFA2_R { | ||
| 363 | FFA2_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 364 | } | ||
| 365 | #[doc = "Bit 3 - Filter FIFO assignment for filter 3"] | ||
| 366 | #[inline(always)] | ||
| 367 | pub fn ffa3(&self) -> FFA3_R { | ||
| 368 | FFA3_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 369 | } | ||
| 370 | #[doc = "Bit 4 - Filter FIFO assignment for filter 4"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn ffa4(&self) -> FFA4_R { | ||
| 373 | FFA4_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 374 | } | ||
| 375 | #[doc = "Bit 5 - Filter FIFO assignment for filter 5"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn ffa5(&self) -> FFA5_R { | ||
| 378 | FFA5_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 379 | } | ||
| 380 | #[doc = "Bit 6 - Filter FIFO assignment for filter 6"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn ffa6(&self) -> FFA6_R { | ||
| 383 | FFA6_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 384 | } | ||
| 385 | #[doc = "Bit 7 - Filter FIFO assignment for filter 7"] | ||
| 386 | #[inline(always)] | ||
| 387 | pub fn ffa7(&self) -> FFA7_R { | ||
| 388 | FFA7_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 389 | } | ||
| 390 | #[doc = "Bit 8 - Filter FIFO assignment for filter 8"] | ||
| 391 | #[inline(always)] | ||
| 392 | pub fn ffa8(&self) -> FFA8_R { | ||
| 393 | FFA8_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 394 | } | ||
| 395 | #[doc = "Bit 9 - Filter FIFO assignment for filter 9"] | ||
| 396 | #[inline(always)] | ||
| 397 | pub fn ffa9(&self) -> FFA9_R { | ||
| 398 | FFA9_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 399 | } | ||
| 400 | #[doc = "Bit 10 - Filter FIFO assignment for filter 10"] | ||
| 401 | #[inline(always)] | ||
| 402 | pub fn ffa10(&self) -> FFA10_R { | ||
| 403 | FFA10_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 404 | } | ||
| 405 | #[doc = "Bit 11 - Filter FIFO assignment for filter 11"] | ||
| 406 | #[inline(always)] | ||
| 407 | pub fn ffa11(&self) -> FFA11_R { | ||
| 408 | FFA11_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 409 | } | ||
| 410 | #[doc = "Bit 12 - Filter FIFO assignment for filter 12"] | ||
| 411 | #[inline(always)] | ||
| 412 | pub fn ffa12(&self) -> FFA12_R { | ||
| 413 | FFA12_R::new(((self.bits >> 12) & 0x01) != 0) | ||
| 414 | } | ||
| 415 | #[doc = "Bit 13 - Filter FIFO assignment for filter 13"] | ||
| 416 | #[inline(always)] | ||
| 417 | pub fn ffa13(&self) -> FFA13_R { | ||
| 418 | FFA13_R::new(((self.bits >> 13) & 0x01) != 0) | ||
| 419 | } | ||
| 420 | } | ||
| 421 | impl W { | ||
| 422 | #[doc = "Bit 0 - Filter FIFO assignment for filter 0"] | ||
| 423 | #[inline(always)] | ||
| 424 | pub fn ffa0(&mut self) -> FFA0_W { | ||
| 425 | FFA0_W { w: self } | ||
| 426 | } | ||
| 427 | #[doc = "Bit 1 - Filter FIFO assignment for filter 1"] | ||
| 428 | #[inline(always)] | ||
| 429 | pub fn ffa1(&mut self) -> FFA1_W { | ||
| 430 | FFA1_W { w: self } | ||
| 431 | } | ||
| 432 | #[doc = "Bit 2 - Filter FIFO assignment for filter 2"] | ||
| 433 | #[inline(always)] | ||
| 434 | pub fn ffa2(&mut self) -> FFA2_W { | ||
| 435 | FFA2_W { w: self } | ||
| 436 | } | ||
| 437 | #[doc = "Bit 3 - Filter FIFO assignment for filter 3"] | ||
| 438 | #[inline(always)] | ||
| 439 | pub fn ffa3(&mut self) -> FFA3_W { | ||
| 440 | FFA3_W { w: self } | ||
| 441 | } | ||
| 442 | #[doc = "Bit 4 - Filter FIFO assignment for filter 4"] | ||
| 443 | #[inline(always)] | ||
| 444 | pub fn ffa4(&mut self) -> FFA4_W { | ||
| 445 | FFA4_W { w: self } | ||
| 446 | } | ||
| 447 | #[doc = "Bit 5 - Filter FIFO assignment for filter 5"] | ||
| 448 | #[inline(always)] | ||
| 449 | pub fn ffa5(&mut self) -> FFA5_W { | ||
| 450 | FFA5_W { w: self } | ||
| 451 | } | ||
| 452 | #[doc = "Bit 6 - Filter FIFO assignment for filter 6"] | ||
| 453 | #[inline(always)] | ||
| 454 | pub fn ffa6(&mut self) -> FFA6_W { | ||
| 455 | FFA6_W { w: self } | ||
| 456 | } | ||
| 457 | #[doc = "Bit 7 - Filter FIFO assignment for filter 7"] | ||
| 458 | #[inline(always)] | ||
| 459 | pub fn ffa7(&mut self) -> FFA7_W { | ||
| 460 | FFA7_W { w: self } | ||
| 461 | } | ||
| 462 | #[doc = "Bit 8 - Filter FIFO assignment for filter 8"] | ||
| 463 | #[inline(always)] | ||
| 464 | pub fn ffa8(&mut self) -> FFA8_W { | ||
| 465 | FFA8_W { w: self } | ||
| 466 | } | ||
| 467 | #[doc = "Bit 9 - Filter FIFO assignment for filter 9"] | ||
| 468 | #[inline(always)] | ||
| 469 | pub fn ffa9(&mut self) -> FFA9_W { | ||
| 470 | FFA9_W { w: self } | ||
| 471 | } | ||
| 472 | #[doc = "Bit 10 - Filter FIFO assignment for filter 10"] | ||
| 473 | #[inline(always)] | ||
| 474 | pub fn ffa10(&mut self) -> FFA10_W { | ||
| 475 | FFA10_W { w: self } | ||
| 476 | } | ||
| 477 | #[doc = "Bit 11 - Filter FIFO assignment for filter 11"] | ||
| 478 | #[inline(always)] | ||
| 479 | pub fn ffa11(&mut self) -> FFA11_W { | ||
| 480 | FFA11_W { w: self } | ||
| 481 | } | ||
| 482 | #[doc = "Bit 12 - Filter FIFO assignment for filter 12"] | ||
| 483 | #[inline(always)] | ||
| 484 | pub fn ffa12(&mut self) -> FFA12_W { | ||
| 485 | FFA12_W { w: self } | ||
| 486 | } | ||
| 487 | #[doc = "Bit 13 - Filter FIFO assignment for filter 13"] | ||
| 488 | #[inline(always)] | ||
| 489 | pub fn ffa13(&mut self) -> FFA13_W { | ||
| 490 | FFA13_W { w: self } | ||
| 491 | } | ||
| 492 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fm1r.rs b/embassy-stm32/src/can/bx/pac/can/fm1r.rs deleted file mode 100644 index 828f1914e..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fm1r.rs +++ /dev/null | |||
| @@ -1,492 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FM1R"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FM1R>; | ||
| 3 | #[doc = "Writer for register FM1R"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FM1R>; | ||
| 5 | #[doc = "Register FM1R `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FM1R { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FBM0`"] | ||
| 14 | pub type FBM0_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Write proxy for field `FBM0`"] | ||
| 16 | pub struct FBM0_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FBM0_W<'a> { | ||
| 20 | #[doc = r"Sets the field bit"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn set_bit(self) -> &'a mut W { | ||
| 23 | self.bit(true) | ||
| 24 | } | ||
| 25 | #[doc = r"Clears the field bit"] | ||
| 26 | #[inline(always)] | ||
| 27 | pub fn clear_bit(self) -> &'a mut W { | ||
| 28 | self.bit(false) | ||
| 29 | } | ||
| 30 | #[doc = r"Writes raw bits to the field"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 33 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 34 | self.w | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Reader of field `FBM1`"] | ||
| 38 | pub type FBM1_R = crate::can::bx::R<bool, bool>; | ||
| 39 | #[doc = "Write proxy for field `FBM1`"] | ||
| 40 | pub struct FBM1_W<'a> { | ||
| 41 | w: &'a mut W, | ||
| 42 | } | ||
| 43 | impl<'a> FBM1_W<'a> { | ||
| 44 | #[doc = r"Sets the field bit"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn set_bit(self) -> &'a mut W { | ||
| 47 | self.bit(true) | ||
| 48 | } | ||
| 49 | #[doc = r"Clears the field bit"] | ||
| 50 | #[inline(always)] | ||
| 51 | pub fn clear_bit(self) -> &'a mut W { | ||
| 52 | self.bit(false) | ||
| 53 | } | ||
| 54 | #[doc = r"Writes raw bits to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 57 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 58 | self.w | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Reader of field `FBM2`"] | ||
| 62 | pub type FBM2_R = crate::can::bx::R<bool, bool>; | ||
| 63 | #[doc = "Write proxy for field `FBM2`"] | ||
| 64 | pub struct FBM2_W<'a> { | ||
| 65 | w: &'a mut W, | ||
| 66 | } | ||
| 67 | impl<'a> FBM2_W<'a> { | ||
| 68 | #[doc = r"Sets the field bit"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn set_bit(self) -> &'a mut W { | ||
| 71 | self.bit(true) | ||
| 72 | } | ||
| 73 | #[doc = r"Clears the field bit"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn clear_bit(self) -> &'a mut W { | ||
| 76 | self.bit(false) | ||
| 77 | } | ||
| 78 | #[doc = r"Writes raw bits to the field"] | ||
| 79 | #[inline(always)] | ||
| 80 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 81 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 82 | self.w | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #[doc = "Reader of field `FBM3`"] | ||
| 86 | pub type FBM3_R = crate::can::bx::R<bool, bool>; | ||
| 87 | #[doc = "Write proxy for field `FBM3`"] | ||
| 88 | pub struct FBM3_W<'a> { | ||
| 89 | w: &'a mut W, | ||
| 90 | } | ||
| 91 | impl<'a> FBM3_W<'a> { | ||
| 92 | #[doc = r"Sets the field bit"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn set_bit(self) -> &'a mut W { | ||
| 95 | self.bit(true) | ||
| 96 | } | ||
| 97 | #[doc = r"Clears the field bit"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn clear_bit(self) -> &'a mut W { | ||
| 100 | self.bit(false) | ||
| 101 | } | ||
| 102 | #[doc = r"Writes raw bits to the field"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 105 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 106 | self.w | ||
| 107 | } | ||
| 108 | } | ||
| 109 | #[doc = "Reader of field `FBM4`"] | ||
| 110 | pub type FBM4_R = crate::can::bx::R<bool, bool>; | ||
| 111 | #[doc = "Write proxy for field `FBM4`"] | ||
| 112 | pub struct FBM4_W<'a> { | ||
| 113 | w: &'a mut W, | ||
| 114 | } | ||
| 115 | impl<'a> FBM4_W<'a> { | ||
| 116 | #[doc = r"Sets the field bit"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn set_bit(self) -> &'a mut W { | ||
| 119 | self.bit(true) | ||
| 120 | } | ||
| 121 | #[doc = r"Clears the field bit"] | ||
| 122 | #[inline(always)] | ||
| 123 | pub fn clear_bit(self) -> &'a mut W { | ||
| 124 | self.bit(false) | ||
| 125 | } | ||
| 126 | #[doc = r"Writes raw bits to the field"] | ||
| 127 | #[inline(always)] | ||
| 128 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 129 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 130 | self.w | ||
| 131 | } | ||
| 132 | } | ||
| 133 | #[doc = "Reader of field `FBM5`"] | ||
| 134 | pub type FBM5_R = crate::can::bx::R<bool, bool>; | ||
| 135 | #[doc = "Write proxy for field `FBM5`"] | ||
| 136 | pub struct FBM5_W<'a> { | ||
| 137 | w: &'a mut W, | ||
| 138 | } | ||
| 139 | impl<'a> FBM5_W<'a> { | ||
| 140 | #[doc = r"Sets the field bit"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn set_bit(self) -> &'a mut W { | ||
| 143 | self.bit(true) | ||
| 144 | } | ||
| 145 | #[doc = r"Clears the field bit"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn clear_bit(self) -> &'a mut W { | ||
| 148 | self.bit(false) | ||
| 149 | } | ||
| 150 | #[doc = r"Writes raw bits to the field"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 153 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 154 | self.w | ||
| 155 | } | ||
| 156 | } | ||
| 157 | #[doc = "Reader of field `FBM6`"] | ||
| 158 | pub type FBM6_R = crate::can::bx::R<bool, bool>; | ||
| 159 | #[doc = "Write proxy for field `FBM6`"] | ||
| 160 | pub struct FBM6_W<'a> { | ||
| 161 | w: &'a mut W, | ||
| 162 | } | ||
| 163 | impl<'a> FBM6_W<'a> { | ||
| 164 | #[doc = r"Sets the field bit"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn set_bit(self) -> &'a mut W { | ||
| 167 | self.bit(true) | ||
| 168 | } | ||
| 169 | #[doc = r"Clears the field bit"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn clear_bit(self) -> &'a mut W { | ||
| 172 | self.bit(false) | ||
| 173 | } | ||
| 174 | #[doc = r"Writes raw bits to the field"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 177 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 178 | self.w | ||
| 179 | } | ||
| 180 | } | ||
| 181 | #[doc = "Reader of field `FBM7`"] | ||
| 182 | pub type FBM7_R = crate::can::bx::R<bool, bool>; | ||
| 183 | #[doc = "Write proxy for field `FBM7`"] | ||
| 184 | pub struct FBM7_W<'a> { | ||
| 185 | w: &'a mut W, | ||
| 186 | } | ||
| 187 | impl<'a> FBM7_W<'a> { | ||
| 188 | #[doc = r"Sets the field bit"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn set_bit(self) -> &'a mut W { | ||
| 191 | self.bit(true) | ||
| 192 | } | ||
| 193 | #[doc = r"Clears the field bit"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn clear_bit(self) -> &'a mut W { | ||
| 196 | self.bit(false) | ||
| 197 | } | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `FBM8`"] | ||
| 206 | pub type FBM8_R = crate::can::bx::R<bool, bool>; | ||
| 207 | #[doc = "Write proxy for field `FBM8`"] | ||
| 208 | pub struct FBM8_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> FBM8_W<'a> { | ||
| 212 | #[doc = r"Sets the field bit"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn set_bit(self) -> &'a mut W { | ||
| 215 | self.bit(true) | ||
| 216 | } | ||
| 217 | #[doc = r"Clears the field bit"] | ||
| 218 | #[inline(always)] | ||
| 219 | pub fn clear_bit(self) -> &'a mut W { | ||
| 220 | self.bit(false) | ||
| 221 | } | ||
| 222 | #[doc = r"Writes raw bits to the field"] | ||
| 223 | #[inline(always)] | ||
| 224 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 225 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 226 | self.w | ||
| 227 | } | ||
| 228 | } | ||
| 229 | #[doc = "Reader of field `FBM9`"] | ||
| 230 | pub type FBM9_R = crate::can::bx::R<bool, bool>; | ||
| 231 | #[doc = "Write proxy for field `FBM9`"] | ||
| 232 | pub struct FBM9_W<'a> { | ||
| 233 | w: &'a mut W, | ||
| 234 | } | ||
| 235 | impl<'a> FBM9_W<'a> { | ||
| 236 | #[doc = r"Sets the field bit"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn set_bit(self) -> &'a mut W { | ||
| 239 | self.bit(true) | ||
| 240 | } | ||
| 241 | #[doc = r"Clears the field bit"] | ||
| 242 | #[inline(always)] | ||
| 243 | pub fn clear_bit(self) -> &'a mut W { | ||
| 244 | self.bit(false) | ||
| 245 | } | ||
| 246 | #[doc = r"Writes raw bits to the field"] | ||
| 247 | #[inline(always)] | ||
| 248 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 249 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 250 | self.w | ||
| 251 | } | ||
| 252 | } | ||
| 253 | #[doc = "Reader of field `FBM10`"] | ||
| 254 | pub type FBM10_R = crate::can::bx::R<bool, bool>; | ||
| 255 | #[doc = "Write proxy for field `FBM10`"] | ||
| 256 | pub struct FBM10_W<'a> { | ||
| 257 | w: &'a mut W, | ||
| 258 | } | ||
| 259 | impl<'a> FBM10_W<'a> { | ||
| 260 | #[doc = r"Sets the field bit"] | ||
| 261 | #[inline(always)] | ||
| 262 | pub fn set_bit(self) -> &'a mut W { | ||
| 263 | self.bit(true) | ||
| 264 | } | ||
| 265 | #[doc = r"Clears the field bit"] | ||
| 266 | #[inline(always)] | ||
| 267 | pub fn clear_bit(self) -> &'a mut W { | ||
| 268 | self.bit(false) | ||
| 269 | } | ||
| 270 | #[doc = r"Writes raw bits to the field"] | ||
| 271 | #[inline(always)] | ||
| 272 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 273 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 274 | self.w | ||
| 275 | } | ||
| 276 | } | ||
| 277 | #[doc = "Reader of field `FBM11`"] | ||
| 278 | pub type FBM11_R = crate::can::bx::R<bool, bool>; | ||
| 279 | #[doc = "Write proxy for field `FBM11`"] | ||
| 280 | pub struct FBM11_W<'a> { | ||
| 281 | w: &'a mut W, | ||
| 282 | } | ||
| 283 | impl<'a> FBM11_W<'a> { | ||
| 284 | #[doc = r"Sets the field bit"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn set_bit(self) -> &'a mut W { | ||
| 287 | self.bit(true) | ||
| 288 | } | ||
| 289 | #[doc = r"Clears the field bit"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn clear_bit(self) -> &'a mut W { | ||
| 292 | self.bit(false) | ||
| 293 | } | ||
| 294 | #[doc = r"Writes raw bits to the field"] | ||
| 295 | #[inline(always)] | ||
| 296 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 297 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 298 | self.w | ||
| 299 | } | ||
| 300 | } | ||
| 301 | #[doc = "Reader of field `FBM12`"] | ||
| 302 | pub type FBM12_R = crate::can::bx::R<bool, bool>; | ||
| 303 | #[doc = "Write proxy for field `FBM12`"] | ||
| 304 | pub struct FBM12_W<'a> { | ||
| 305 | w: &'a mut W, | ||
| 306 | } | ||
| 307 | impl<'a> FBM12_W<'a> { | ||
| 308 | #[doc = r"Sets the field bit"] | ||
| 309 | #[inline(always)] | ||
| 310 | pub fn set_bit(self) -> &'a mut W { | ||
| 311 | self.bit(true) | ||
| 312 | } | ||
| 313 | #[doc = r"Clears the field bit"] | ||
| 314 | #[inline(always)] | ||
| 315 | pub fn clear_bit(self) -> &'a mut W { | ||
| 316 | self.bit(false) | ||
| 317 | } | ||
| 318 | #[doc = r"Writes raw bits to the field"] | ||
| 319 | #[inline(always)] | ||
| 320 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 321 | self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); | ||
| 322 | self.w | ||
| 323 | } | ||
| 324 | } | ||
| 325 | #[doc = "Reader of field `FBM13`"] | ||
| 326 | pub type FBM13_R = crate::can::bx::R<bool, bool>; | ||
| 327 | #[doc = "Write proxy for field `FBM13`"] | ||
| 328 | pub struct FBM13_W<'a> { | ||
| 329 | w: &'a mut W, | ||
| 330 | } | ||
| 331 | impl<'a> FBM13_W<'a> { | ||
| 332 | #[doc = r"Sets the field bit"] | ||
| 333 | #[inline(always)] | ||
| 334 | pub fn set_bit(self) -> &'a mut W { | ||
| 335 | self.bit(true) | ||
| 336 | } | ||
| 337 | #[doc = r"Clears the field bit"] | ||
| 338 | #[inline(always)] | ||
| 339 | pub fn clear_bit(self) -> &'a mut W { | ||
| 340 | self.bit(false) | ||
| 341 | } | ||
| 342 | #[doc = r"Writes raw bits to the field"] | ||
| 343 | #[inline(always)] | ||
| 344 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 345 | self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); | ||
| 346 | self.w | ||
| 347 | } | ||
| 348 | } | ||
| 349 | impl R { | ||
| 350 | #[doc = "Bit 0 - Filter mode"] | ||
| 351 | #[inline(always)] | ||
| 352 | pub fn fbm0(&self) -> FBM0_R { | ||
| 353 | FBM0_R::new((self.bits & 0x01) != 0) | ||
| 354 | } | ||
| 355 | #[doc = "Bit 1 - Filter mode"] | ||
| 356 | #[inline(always)] | ||
| 357 | pub fn fbm1(&self) -> FBM1_R { | ||
| 358 | FBM1_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 359 | } | ||
| 360 | #[doc = "Bit 2 - Filter mode"] | ||
| 361 | #[inline(always)] | ||
| 362 | pub fn fbm2(&self) -> FBM2_R { | ||
| 363 | FBM2_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 364 | } | ||
| 365 | #[doc = "Bit 3 - Filter mode"] | ||
| 366 | #[inline(always)] | ||
| 367 | pub fn fbm3(&self) -> FBM3_R { | ||
| 368 | FBM3_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 369 | } | ||
| 370 | #[doc = "Bit 4 - Filter mode"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn fbm4(&self) -> FBM4_R { | ||
| 373 | FBM4_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 374 | } | ||
| 375 | #[doc = "Bit 5 - Filter mode"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn fbm5(&self) -> FBM5_R { | ||
| 378 | FBM5_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 379 | } | ||
| 380 | #[doc = "Bit 6 - Filter mode"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn fbm6(&self) -> FBM6_R { | ||
| 383 | FBM6_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 384 | } | ||
| 385 | #[doc = "Bit 7 - Filter mode"] | ||
| 386 | #[inline(always)] | ||
| 387 | pub fn fbm7(&self) -> FBM7_R { | ||
| 388 | FBM7_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 389 | } | ||
| 390 | #[doc = "Bit 8 - Filter mode"] | ||
| 391 | #[inline(always)] | ||
| 392 | pub fn fbm8(&self) -> FBM8_R { | ||
| 393 | FBM8_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 394 | } | ||
| 395 | #[doc = "Bit 9 - Filter mode"] | ||
| 396 | #[inline(always)] | ||
| 397 | pub fn fbm9(&self) -> FBM9_R { | ||
| 398 | FBM9_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 399 | } | ||
| 400 | #[doc = "Bit 10 - Filter mode"] | ||
| 401 | #[inline(always)] | ||
| 402 | pub fn fbm10(&self) -> FBM10_R { | ||
| 403 | FBM10_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 404 | } | ||
| 405 | #[doc = "Bit 11 - Filter mode"] | ||
| 406 | #[inline(always)] | ||
| 407 | pub fn fbm11(&self) -> FBM11_R { | ||
| 408 | FBM11_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 409 | } | ||
| 410 | #[doc = "Bit 12 - Filter mode"] | ||
| 411 | #[inline(always)] | ||
| 412 | pub fn fbm12(&self) -> FBM12_R { | ||
| 413 | FBM12_R::new(((self.bits >> 12) & 0x01) != 0) | ||
| 414 | } | ||
| 415 | #[doc = "Bit 13 - Filter mode"] | ||
| 416 | #[inline(always)] | ||
| 417 | pub fn fbm13(&self) -> FBM13_R { | ||
| 418 | FBM13_R::new(((self.bits >> 13) & 0x01) != 0) | ||
| 419 | } | ||
| 420 | } | ||
| 421 | impl W { | ||
| 422 | #[doc = "Bit 0 - Filter mode"] | ||
| 423 | #[inline(always)] | ||
| 424 | pub fn fbm0(&mut self) -> FBM0_W { | ||
| 425 | FBM0_W { w: self } | ||
| 426 | } | ||
| 427 | #[doc = "Bit 1 - Filter mode"] | ||
| 428 | #[inline(always)] | ||
| 429 | pub fn fbm1(&mut self) -> FBM1_W { | ||
| 430 | FBM1_W { w: self } | ||
| 431 | } | ||
| 432 | #[doc = "Bit 2 - Filter mode"] | ||
| 433 | #[inline(always)] | ||
| 434 | pub fn fbm2(&mut self) -> FBM2_W { | ||
| 435 | FBM2_W { w: self } | ||
| 436 | } | ||
| 437 | #[doc = "Bit 3 - Filter mode"] | ||
| 438 | #[inline(always)] | ||
| 439 | pub fn fbm3(&mut self) -> FBM3_W { | ||
| 440 | FBM3_W { w: self } | ||
| 441 | } | ||
| 442 | #[doc = "Bit 4 - Filter mode"] | ||
| 443 | #[inline(always)] | ||
| 444 | pub fn fbm4(&mut self) -> FBM4_W { | ||
| 445 | FBM4_W { w: self } | ||
| 446 | } | ||
| 447 | #[doc = "Bit 5 - Filter mode"] | ||
| 448 | #[inline(always)] | ||
| 449 | pub fn fbm5(&mut self) -> FBM5_W { | ||
| 450 | FBM5_W { w: self } | ||
| 451 | } | ||
| 452 | #[doc = "Bit 6 - Filter mode"] | ||
| 453 | #[inline(always)] | ||
| 454 | pub fn fbm6(&mut self) -> FBM6_W { | ||
| 455 | FBM6_W { w: self } | ||
| 456 | } | ||
| 457 | #[doc = "Bit 7 - Filter mode"] | ||
| 458 | #[inline(always)] | ||
| 459 | pub fn fbm7(&mut self) -> FBM7_W { | ||
| 460 | FBM7_W { w: self } | ||
| 461 | } | ||
| 462 | #[doc = "Bit 8 - Filter mode"] | ||
| 463 | #[inline(always)] | ||
| 464 | pub fn fbm8(&mut self) -> FBM8_W { | ||
| 465 | FBM8_W { w: self } | ||
| 466 | } | ||
| 467 | #[doc = "Bit 9 - Filter mode"] | ||
| 468 | #[inline(always)] | ||
| 469 | pub fn fbm9(&mut self) -> FBM9_W { | ||
| 470 | FBM9_W { w: self } | ||
| 471 | } | ||
| 472 | #[doc = "Bit 10 - Filter mode"] | ||
| 473 | #[inline(always)] | ||
| 474 | pub fn fbm10(&mut self) -> FBM10_W { | ||
| 475 | FBM10_W { w: self } | ||
| 476 | } | ||
| 477 | #[doc = "Bit 11 - Filter mode"] | ||
| 478 | #[inline(always)] | ||
| 479 | pub fn fbm11(&mut self) -> FBM11_W { | ||
| 480 | FBM11_W { w: self } | ||
| 481 | } | ||
| 482 | #[doc = "Bit 12 - Filter mode"] | ||
| 483 | #[inline(always)] | ||
| 484 | pub fn fbm12(&mut self) -> FBM12_W { | ||
| 485 | FBM12_W { w: self } | ||
| 486 | } | ||
| 487 | #[doc = "Bit 13 - Filter mode"] | ||
| 488 | #[inline(always)] | ||
| 489 | pub fn fbm13(&mut self) -> FBM13_W { | ||
| 490 | FBM13_W { w: self } | ||
| 491 | } | ||
| 492 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fmr.rs b/embassy-stm32/src/can/bx/pac/can/fmr.rs deleted file mode 100644 index 5663ff3cd..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fmr.rs +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FMR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FMR>; | ||
| 3 | #[doc = "Writer for register FMR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FMR>; | ||
| 5 | #[doc = "Register FMR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FMR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `CAN2SB`"] | ||
| 14 | pub type CAN2SB_R = crate::can::bx::R<u8, u8>; | ||
| 15 | #[doc = "Write proxy for field `CAN2SB`"] | ||
| 16 | pub struct CAN2SB_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> CAN2SB_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !(0x3f << 8)) | (((value as u32) & 0x3f) << 8); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `FINIT`"] | ||
| 28 | pub type FINIT_R = crate::can::bx::R<bool, bool>; | ||
| 29 | #[doc = "Write proxy for field `FINIT`"] | ||
| 30 | pub struct FINIT_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> FINIT_W<'a> { | ||
| 34 | #[doc = r"Sets the field bit"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub fn set_bit(self) -> &'a mut W { | ||
| 37 | self.bit(true) | ||
| 38 | } | ||
| 39 | #[doc = r"Clears the field bit"] | ||
| 40 | #[inline(always)] | ||
| 41 | pub fn clear_bit(self) -> &'a mut W { | ||
| 42 | self.bit(false) | ||
| 43 | } | ||
| 44 | #[doc = r"Writes raw bits to the field"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 47 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 48 | self.w | ||
| 49 | } | ||
| 50 | } | ||
| 51 | impl R { | ||
| 52 | #[doc = "Bits 8:13 - CAN2SB"] | ||
| 53 | #[inline(always)] | ||
| 54 | pub fn can2sb(&self) -> CAN2SB_R { | ||
| 55 | CAN2SB_R::new(((self.bits >> 8) & 0x3f) as u8) | ||
| 56 | } | ||
| 57 | #[doc = "Bit 0 - FINIT"] | ||
| 58 | #[inline(always)] | ||
| 59 | pub fn finit(&self) -> FINIT_R { | ||
| 60 | FINIT_R::new((self.bits & 0x01) != 0) | ||
| 61 | } | ||
| 62 | } | ||
| 63 | impl W { | ||
| 64 | #[doc = "Bits 8:13 - CAN2SB"] | ||
| 65 | #[inline(always)] | ||
| 66 | pub fn can2sb(&mut self) -> CAN2SB_W { | ||
| 67 | CAN2SB_W { w: self } | ||
| 68 | } | ||
| 69 | #[doc = "Bit 0 - FINIT"] | ||
| 70 | #[inline(always)] | ||
| 71 | pub fn finit(&mut self) -> FINIT_W { | ||
| 72 | FINIT_W { w: self } | ||
| 73 | } | ||
| 74 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/fs1r.rs b/embassy-stm32/src/can/bx/pac/can/fs1r.rs deleted file mode 100644 index eea27887b..000000000 --- a/embassy-stm32/src/can/bx/pac/can/fs1r.rs +++ /dev/null | |||
| @@ -1,492 +0,0 @@ | |||
| 1 | #[doc = "Reader of register FS1R"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::FS1R>; | ||
| 3 | #[doc = "Writer for register FS1R"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::FS1R>; | ||
| 5 | #[doc = "Register FS1R `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::FS1R { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `FSC0`"] | ||
| 14 | pub type FSC0_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Write proxy for field `FSC0`"] | ||
| 16 | pub struct FSC0_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> FSC0_W<'a> { | ||
| 20 | #[doc = r"Sets the field bit"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn set_bit(self) -> &'a mut W { | ||
| 23 | self.bit(true) | ||
| 24 | } | ||
| 25 | #[doc = r"Clears the field bit"] | ||
| 26 | #[inline(always)] | ||
| 27 | pub fn clear_bit(self) -> &'a mut W { | ||
| 28 | self.bit(false) | ||
| 29 | } | ||
| 30 | #[doc = r"Writes raw bits to the field"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 33 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 34 | self.w | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Reader of field `FSC1`"] | ||
| 38 | pub type FSC1_R = crate::can::bx::R<bool, bool>; | ||
| 39 | #[doc = "Write proxy for field `FSC1`"] | ||
| 40 | pub struct FSC1_W<'a> { | ||
| 41 | w: &'a mut W, | ||
| 42 | } | ||
| 43 | impl<'a> FSC1_W<'a> { | ||
| 44 | #[doc = r"Sets the field bit"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn set_bit(self) -> &'a mut W { | ||
| 47 | self.bit(true) | ||
| 48 | } | ||
| 49 | #[doc = r"Clears the field bit"] | ||
| 50 | #[inline(always)] | ||
| 51 | pub fn clear_bit(self) -> &'a mut W { | ||
| 52 | self.bit(false) | ||
| 53 | } | ||
| 54 | #[doc = r"Writes raw bits to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 57 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 58 | self.w | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Reader of field `FSC2`"] | ||
| 62 | pub type FSC2_R = crate::can::bx::R<bool, bool>; | ||
| 63 | #[doc = "Write proxy for field `FSC2`"] | ||
| 64 | pub struct FSC2_W<'a> { | ||
| 65 | w: &'a mut W, | ||
| 66 | } | ||
| 67 | impl<'a> FSC2_W<'a> { | ||
| 68 | #[doc = r"Sets the field bit"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn set_bit(self) -> &'a mut W { | ||
| 71 | self.bit(true) | ||
| 72 | } | ||
| 73 | #[doc = r"Clears the field bit"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn clear_bit(self) -> &'a mut W { | ||
| 76 | self.bit(false) | ||
| 77 | } | ||
| 78 | #[doc = r"Writes raw bits to the field"] | ||
| 79 | #[inline(always)] | ||
| 80 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 81 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 82 | self.w | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #[doc = "Reader of field `FSC3`"] | ||
| 86 | pub type FSC3_R = crate::can::bx::R<bool, bool>; | ||
| 87 | #[doc = "Write proxy for field `FSC3`"] | ||
| 88 | pub struct FSC3_W<'a> { | ||
| 89 | w: &'a mut W, | ||
| 90 | } | ||
| 91 | impl<'a> FSC3_W<'a> { | ||
| 92 | #[doc = r"Sets the field bit"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn set_bit(self) -> &'a mut W { | ||
| 95 | self.bit(true) | ||
| 96 | } | ||
| 97 | #[doc = r"Clears the field bit"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn clear_bit(self) -> &'a mut W { | ||
| 100 | self.bit(false) | ||
| 101 | } | ||
| 102 | #[doc = r"Writes raw bits to the field"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 105 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 106 | self.w | ||
| 107 | } | ||
| 108 | } | ||
| 109 | #[doc = "Reader of field `FSC4`"] | ||
| 110 | pub type FSC4_R = crate::can::bx::R<bool, bool>; | ||
| 111 | #[doc = "Write proxy for field `FSC4`"] | ||
| 112 | pub struct FSC4_W<'a> { | ||
| 113 | w: &'a mut W, | ||
| 114 | } | ||
| 115 | impl<'a> FSC4_W<'a> { | ||
| 116 | #[doc = r"Sets the field bit"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn set_bit(self) -> &'a mut W { | ||
| 119 | self.bit(true) | ||
| 120 | } | ||
| 121 | #[doc = r"Clears the field bit"] | ||
| 122 | #[inline(always)] | ||
| 123 | pub fn clear_bit(self) -> &'a mut W { | ||
| 124 | self.bit(false) | ||
| 125 | } | ||
| 126 | #[doc = r"Writes raw bits to the field"] | ||
| 127 | #[inline(always)] | ||
| 128 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 129 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 130 | self.w | ||
| 131 | } | ||
| 132 | } | ||
| 133 | #[doc = "Reader of field `FSC5`"] | ||
| 134 | pub type FSC5_R = crate::can::bx::R<bool, bool>; | ||
| 135 | #[doc = "Write proxy for field `FSC5`"] | ||
| 136 | pub struct FSC5_W<'a> { | ||
| 137 | w: &'a mut W, | ||
| 138 | } | ||
| 139 | impl<'a> FSC5_W<'a> { | ||
| 140 | #[doc = r"Sets the field bit"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn set_bit(self) -> &'a mut W { | ||
| 143 | self.bit(true) | ||
| 144 | } | ||
| 145 | #[doc = r"Clears the field bit"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn clear_bit(self) -> &'a mut W { | ||
| 148 | self.bit(false) | ||
| 149 | } | ||
| 150 | #[doc = r"Writes raw bits to the field"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 153 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 154 | self.w | ||
| 155 | } | ||
| 156 | } | ||
| 157 | #[doc = "Reader of field `FSC6`"] | ||
| 158 | pub type FSC6_R = crate::can::bx::R<bool, bool>; | ||
| 159 | #[doc = "Write proxy for field `FSC6`"] | ||
| 160 | pub struct FSC6_W<'a> { | ||
| 161 | w: &'a mut W, | ||
| 162 | } | ||
| 163 | impl<'a> FSC6_W<'a> { | ||
| 164 | #[doc = r"Sets the field bit"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn set_bit(self) -> &'a mut W { | ||
| 167 | self.bit(true) | ||
| 168 | } | ||
| 169 | #[doc = r"Clears the field bit"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn clear_bit(self) -> &'a mut W { | ||
| 172 | self.bit(false) | ||
| 173 | } | ||
| 174 | #[doc = r"Writes raw bits to the field"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 177 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 178 | self.w | ||
| 179 | } | ||
| 180 | } | ||
| 181 | #[doc = "Reader of field `FSC7`"] | ||
| 182 | pub type FSC7_R = crate::can::bx::R<bool, bool>; | ||
| 183 | #[doc = "Write proxy for field `FSC7`"] | ||
| 184 | pub struct FSC7_W<'a> { | ||
| 185 | w: &'a mut W, | ||
| 186 | } | ||
| 187 | impl<'a> FSC7_W<'a> { | ||
| 188 | #[doc = r"Sets the field bit"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn set_bit(self) -> &'a mut W { | ||
| 191 | self.bit(true) | ||
| 192 | } | ||
| 193 | #[doc = r"Clears the field bit"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn clear_bit(self) -> &'a mut W { | ||
| 196 | self.bit(false) | ||
| 197 | } | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `FSC8`"] | ||
| 206 | pub type FSC8_R = crate::can::bx::R<bool, bool>; | ||
| 207 | #[doc = "Write proxy for field `FSC8`"] | ||
| 208 | pub struct FSC8_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> FSC8_W<'a> { | ||
| 212 | #[doc = r"Sets the field bit"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn set_bit(self) -> &'a mut W { | ||
| 215 | self.bit(true) | ||
| 216 | } | ||
| 217 | #[doc = r"Clears the field bit"] | ||
| 218 | #[inline(always)] | ||
| 219 | pub fn clear_bit(self) -> &'a mut W { | ||
| 220 | self.bit(false) | ||
| 221 | } | ||
| 222 | #[doc = r"Writes raw bits to the field"] | ||
| 223 | #[inline(always)] | ||
| 224 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 225 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 226 | self.w | ||
| 227 | } | ||
| 228 | } | ||
| 229 | #[doc = "Reader of field `FSC9`"] | ||
| 230 | pub type FSC9_R = crate::can::bx::R<bool, bool>; | ||
| 231 | #[doc = "Write proxy for field `FSC9`"] | ||
| 232 | pub struct FSC9_W<'a> { | ||
| 233 | w: &'a mut W, | ||
| 234 | } | ||
| 235 | impl<'a> FSC9_W<'a> { | ||
| 236 | #[doc = r"Sets the field bit"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn set_bit(self) -> &'a mut W { | ||
| 239 | self.bit(true) | ||
| 240 | } | ||
| 241 | #[doc = r"Clears the field bit"] | ||
| 242 | #[inline(always)] | ||
| 243 | pub fn clear_bit(self) -> &'a mut W { | ||
| 244 | self.bit(false) | ||
| 245 | } | ||
| 246 | #[doc = r"Writes raw bits to the field"] | ||
| 247 | #[inline(always)] | ||
| 248 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 249 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 250 | self.w | ||
| 251 | } | ||
| 252 | } | ||
| 253 | #[doc = "Reader of field `FSC10`"] | ||
| 254 | pub type FSC10_R = crate::can::bx::R<bool, bool>; | ||
| 255 | #[doc = "Write proxy for field `FSC10`"] | ||
| 256 | pub struct FSC10_W<'a> { | ||
| 257 | w: &'a mut W, | ||
| 258 | } | ||
| 259 | impl<'a> FSC10_W<'a> { | ||
| 260 | #[doc = r"Sets the field bit"] | ||
| 261 | #[inline(always)] | ||
| 262 | pub fn set_bit(self) -> &'a mut W { | ||
| 263 | self.bit(true) | ||
| 264 | } | ||
| 265 | #[doc = r"Clears the field bit"] | ||
| 266 | #[inline(always)] | ||
| 267 | pub fn clear_bit(self) -> &'a mut W { | ||
| 268 | self.bit(false) | ||
| 269 | } | ||
| 270 | #[doc = r"Writes raw bits to the field"] | ||
| 271 | #[inline(always)] | ||
| 272 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 273 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 274 | self.w | ||
| 275 | } | ||
| 276 | } | ||
| 277 | #[doc = "Reader of field `FSC11`"] | ||
| 278 | pub type FSC11_R = crate::can::bx::R<bool, bool>; | ||
| 279 | #[doc = "Write proxy for field `FSC11`"] | ||
| 280 | pub struct FSC11_W<'a> { | ||
| 281 | w: &'a mut W, | ||
| 282 | } | ||
| 283 | impl<'a> FSC11_W<'a> { | ||
| 284 | #[doc = r"Sets the field bit"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn set_bit(self) -> &'a mut W { | ||
| 287 | self.bit(true) | ||
| 288 | } | ||
| 289 | #[doc = r"Clears the field bit"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn clear_bit(self) -> &'a mut W { | ||
| 292 | self.bit(false) | ||
| 293 | } | ||
| 294 | #[doc = r"Writes raw bits to the field"] | ||
| 295 | #[inline(always)] | ||
| 296 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 297 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 298 | self.w | ||
| 299 | } | ||
| 300 | } | ||
| 301 | #[doc = "Reader of field `FSC12`"] | ||
| 302 | pub type FSC12_R = crate::can::bx::R<bool, bool>; | ||
| 303 | #[doc = "Write proxy for field `FSC12`"] | ||
| 304 | pub struct FSC12_W<'a> { | ||
| 305 | w: &'a mut W, | ||
| 306 | } | ||
| 307 | impl<'a> FSC12_W<'a> { | ||
| 308 | #[doc = r"Sets the field bit"] | ||
| 309 | #[inline(always)] | ||
| 310 | pub fn set_bit(self) -> &'a mut W { | ||
| 311 | self.bit(true) | ||
| 312 | } | ||
| 313 | #[doc = r"Clears the field bit"] | ||
| 314 | #[inline(always)] | ||
| 315 | pub fn clear_bit(self) -> &'a mut W { | ||
| 316 | self.bit(false) | ||
| 317 | } | ||
| 318 | #[doc = r"Writes raw bits to the field"] | ||
| 319 | #[inline(always)] | ||
| 320 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 321 | self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); | ||
| 322 | self.w | ||
| 323 | } | ||
| 324 | } | ||
| 325 | #[doc = "Reader of field `FSC13`"] | ||
| 326 | pub type FSC13_R = crate::can::bx::R<bool, bool>; | ||
| 327 | #[doc = "Write proxy for field `FSC13`"] | ||
| 328 | pub struct FSC13_W<'a> { | ||
| 329 | w: &'a mut W, | ||
| 330 | } | ||
| 331 | impl<'a> FSC13_W<'a> { | ||
| 332 | #[doc = r"Sets the field bit"] | ||
| 333 | #[inline(always)] | ||
| 334 | pub fn set_bit(self) -> &'a mut W { | ||
| 335 | self.bit(true) | ||
| 336 | } | ||
| 337 | #[doc = r"Clears the field bit"] | ||
| 338 | #[inline(always)] | ||
| 339 | pub fn clear_bit(self) -> &'a mut W { | ||
| 340 | self.bit(false) | ||
| 341 | } | ||
| 342 | #[doc = r"Writes raw bits to the field"] | ||
| 343 | #[inline(always)] | ||
| 344 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 345 | self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); | ||
| 346 | self.w | ||
| 347 | } | ||
| 348 | } | ||
| 349 | impl R { | ||
| 350 | #[doc = "Bit 0 - Filter scale configuration"] | ||
| 351 | #[inline(always)] | ||
| 352 | pub fn fsc0(&self) -> FSC0_R { | ||
| 353 | FSC0_R::new((self.bits & 0x01) != 0) | ||
| 354 | } | ||
| 355 | #[doc = "Bit 1 - Filter scale configuration"] | ||
| 356 | #[inline(always)] | ||
| 357 | pub fn fsc1(&self) -> FSC1_R { | ||
| 358 | FSC1_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 359 | } | ||
| 360 | #[doc = "Bit 2 - Filter scale configuration"] | ||
| 361 | #[inline(always)] | ||
| 362 | pub fn fsc2(&self) -> FSC2_R { | ||
| 363 | FSC2_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 364 | } | ||
| 365 | #[doc = "Bit 3 - Filter scale configuration"] | ||
| 366 | #[inline(always)] | ||
| 367 | pub fn fsc3(&self) -> FSC3_R { | ||
| 368 | FSC3_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 369 | } | ||
| 370 | #[doc = "Bit 4 - Filter scale configuration"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn fsc4(&self) -> FSC4_R { | ||
| 373 | FSC4_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 374 | } | ||
| 375 | #[doc = "Bit 5 - Filter scale configuration"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn fsc5(&self) -> FSC5_R { | ||
| 378 | FSC5_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 379 | } | ||
| 380 | #[doc = "Bit 6 - Filter scale configuration"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn fsc6(&self) -> FSC6_R { | ||
| 383 | FSC6_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 384 | } | ||
| 385 | #[doc = "Bit 7 - Filter scale configuration"] | ||
| 386 | #[inline(always)] | ||
| 387 | pub fn fsc7(&self) -> FSC7_R { | ||
| 388 | FSC7_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 389 | } | ||
| 390 | #[doc = "Bit 8 - Filter scale configuration"] | ||
| 391 | #[inline(always)] | ||
| 392 | pub fn fsc8(&self) -> FSC8_R { | ||
| 393 | FSC8_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 394 | } | ||
| 395 | #[doc = "Bit 9 - Filter scale configuration"] | ||
| 396 | #[inline(always)] | ||
| 397 | pub fn fsc9(&self) -> FSC9_R { | ||
| 398 | FSC9_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 399 | } | ||
| 400 | #[doc = "Bit 10 - Filter scale configuration"] | ||
| 401 | #[inline(always)] | ||
| 402 | pub fn fsc10(&self) -> FSC10_R { | ||
| 403 | FSC10_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 404 | } | ||
| 405 | #[doc = "Bit 11 - Filter scale configuration"] | ||
| 406 | #[inline(always)] | ||
| 407 | pub fn fsc11(&self) -> FSC11_R { | ||
| 408 | FSC11_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 409 | } | ||
| 410 | #[doc = "Bit 12 - Filter scale configuration"] | ||
| 411 | #[inline(always)] | ||
| 412 | pub fn fsc12(&self) -> FSC12_R { | ||
| 413 | FSC12_R::new(((self.bits >> 12) & 0x01) != 0) | ||
| 414 | } | ||
| 415 | #[doc = "Bit 13 - Filter scale configuration"] | ||
| 416 | #[inline(always)] | ||
| 417 | pub fn fsc13(&self) -> FSC13_R { | ||
| 418 | FSC13_R::new(((self.bits >> 13) & 0x01) != 0) | ||
| 419 | } | ||
| 420 | } | ||
| 421 | impl W { | ||
| 422 | #[doc = "Bit 0 - Filter scale configuration"] | ||
| 423 | #[inline(always)] | ||
| 424 | pub fn fsc0(&mut self) -> FSC0_W { | ||
| 425 | FSC0_W { w: self } | ||
| 426 | } | ||
| 427 | #[doc = "Bit 1 - Filter scale configuration"] | ||
| 428 | #[inline(always)] | ||
| 429 | pub fn fsc1(&mut self) -> FSC1_W { | ||
| 430 | FSC1_W { w: self } | ||
| 431 | } | ||
| 432 | #[doc = "Bit 2 - Filter scale configuration"] | ||
| 433 | #[inline(always)] | ||
| 434 | pub fn fsc2(&mut self) -> FSC2_W { | ||
| 435 | FSC2_W { w: self } | ||
| 436 | } | ||
| 437 | #[doc = "Bit 3 - Filter scale configuration"] | ||
| 438 | #[inline(always)] | ||
| 439 | pub fn fsc3(&mut self) -> FSC3_W { | ||
| 440 | FSC3_W { w: self } | ||
| 441 | } | ||
| 442 | #[doc = "Bit 4 - Filter scale configuration"] | ||
| 443 | #[inline(always)] | ||
| 444 | pub fn fsc4(&mut self) -> FSC4_W { | ||
| 445 | FSC4_W { w: self } | ||
| 446 | } | ||
| 447 | #[doc = "Bit 5 - Filter scale configuration"] | ||
| 448 | #[inline(always)] | ||
| 449 | pub fn fsc5(&mut self) -> FSC5_W { | ||
| 450 | FSC5_W { w: self } | ||
| 451 | } | ||
| 452 | #[doc = "Bit 6 - Filter scale configuration"] | ||
| 453 | #[inline(always)] | ||
| 454 | pub fn fsc6(&mut self) -> FSC6_W { | ||
| 455 | FSC6_W { w: self } | ||
| 456 | } | ||
| 457 | #[doc = "Bit 7 - Filter scale configuration"] | ||
| 458 | #[inline(always)] | ||
| 459 | pub fn fsc7(&mut self) -> FSC7_W { | ||
| 460 | FSC7_W { w: self } | ||
| 461 | } | ||
| 462 | #[doc = "Bit 8 - Filter scale configuration"] | ||
| 463 | #[inline(always)] | ||
| 464 | pub fn fsc8(&mut self) -> FSC8_W { | ||
| 465 | FSC8_W { w: self } | ||
| 466 | } | ||
| 467 | #[doc = "Bit 9 - Filter scale configuration"] | ||
| 468 | #[inline(always)] | ||
| 469 | pub fn fsc9(&mut self) -> FSC9_W { | ||
| 470 | FSC9_W { w: self } | ||
| 471 | } | ||
| 472 | #[doc = "Bit 10 - Filter scale configuration"] | ||
| 473 | #[inline(always)] | ||
| 474 | pub fn fsc10(&mut self) -> FSC10_W { | ||
| 475 | FSC10_W { w: self } | ||
| 476 | } | ||
| 477 | #[doc = "Bit 11 - Filter scale configuration"] | ||
| 478 | #[inline(always)] | ||
| 479 | pub fn fsc11(&mut self) -> FSC11_W { | ||
| 480 | FSC11_W { w: self } | ||
| 481 | } | ||
| 482 | #[doc = "Bit 12 - Filter scale configuration"] | ||
| 483 | #[inline(always)] | ||
| 484 | pub fn fsc12(&mut self) -> FSC12_W { | ||
| 485 | FSC12_W { w: self } | ||
| 486 | } | ||
| 487 | #[doc = "Bit 13 - Filter scale configuration"] | ||
| 488 | #[inline(always)] | ||
| 489 | pub fn fsc13(&mut self) -> FSC13_W { | ||
| 490 | FSC13_W { w: self } | ||
| 491 | } | ||
| 492 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/ier.rs b/embassy-stm32/src/can/bx/pac/can/ier.rs deleted file mode 100644 index fa73254b7..000000000 --- a/embassy-stm32/src/can/bx/pac/can/ier.rs +++ /dev/null | |||
| @@ -1,1218 +0,0 @@ | |||
| 1 | #[doc = "Reader of register IER"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::IER>; | ||
| 3 | #[doc = "Writer for register IER"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::IER>; | ||
| 5 | #[doc = "Register IER `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::IER { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "SLKIE\n\nValue on reset: 0"] | ||
| 14 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 15 | pub enum SLKIE_A { | ||
| 16 | #[doc = "0: No interrupt when SLAKI bit is set"] | ||
| 17 | DISABLED = 0, | ||
| 18 | #[doc = "1: Interrupt generated when SLAKI bit is set"] | ||
| 19 | ENABLED = 1, | ||
| 20 | } | ||
| 21 | impl From<SLKIE_A> for bool { | ||
| 22 | #[inline(always)] | ||
| 23 | fn from(variant: SLKIE_A) -> Self { | ||
| 24 | variant as u8 != 0 | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `SLKIE`"] | ||
| 28 | pub type SLKIE_R = crate::can::bx::R<bool, SLKIE_A>; | ||
| 29 | impl SLKIE_R { | ||
| 30 | #[doc = r"Get enumerated values variant"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn variant(&self) -> SLKIE_A { | ||
| 33 | match self.bits { | ||
| 34 | false => SLKIE_A::DISABLED, | ||
| 35 | true => SLKIE_A::ENABLED, | ||
| 36 | } | ||
| 37 | } | ||
| 38 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 39 | #[inline(always)] | ||
| 40 | pub fn is_disabled(&self) -> bool { | ||
| 41 | *self == SLKIE_A::DISABLED | ||
| 42 | } | ||
| 43 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 44 | #[inline(always)] | ||
| 45 | pub fn is_enabled(&self) -> bool { | ||
| 46 | *self == SLKIE_A::ENABLED | ||
| 47 | } | ||
| 48 | } | ||
| 49 | #[doc = "Write proxy for field `SLKIE`"] | ||
| 50 | pub struct SLKIE_W<'a> { | ||
| 51 | w: &'a mut W, | ||
| 52 | } | ||
| 53 | impl<'a> SLKIE_W<'a> { | ||
| 54 | #[doc = r"Writes `variant` to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn variant(self, variant: SLKIE_A) -> &'a mut W { | ||
| 57 | { | ||
| 58 | self.bit(variant.into()) | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "No interrupt when SLAKI bit is set"] | ||
| 62 | #[inline(always)] | ||
| 63 | pub fn disabled(self) -> &'a mut W { | ||
| 64 | self.variant(SLKIE_A::DISABLED) | ||
| 65 | } | ||
| 66 | #[doc = "Interrupt generated when SLAKI bit is set"] | ||
| 67 | #[inline(always)] | ||
| 68 | pub fn enabled(self) -> &'a mut W { | ||
| 69 | self.variant(SLKIE_A::ENABLED) | ||
| 70 | } | ||
| 71 | #[doc = r"Sets the field bit"] | ||
| 72 | #[inline(always)] | ||
| 73 | pub fn set_bit(self) -> &'a mut W { | ||
| 74 | self.bit(true) | ||
| 75 | } | ||
| 76 | #[doc = r"Clears the field bit"] | ||
| 77 | #[inline(always)] | ||
| 78 | pub fn clear_bit(self) -> &'a mut W { | ||
| 79 | self.bit(false) | ||
| 80 | } | ||
| 81 | #[doc = r"Writes raw bits to the field"] | ||
| 82 | #[inline(always)] | ||
| 83 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 84 | self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); | ||
| 85 | self.w | ||
| 86 | } | ||
| 87 | } | ||
| 88 | #[doc = "WKUIE\n\nValue on reset: 0"] | ||
| 89 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 90 | pub enum WKUIE_A { | ||
| 91 | #[doc = "0: No interrupt when WKUI is set"] | ||
| 92 | DISABLED = 0, | ||
| 93 | #[doc = "1: Interrupt generated when WKUI bit is set"] | ||
| 94 | ENABLED = 1, | ||
| 95 | } | ||
| 96 | impl From<WKUIE_A> for bool { | ||
| 97 | #[inline(always)] | ||
| 98 | fn from(variant: WKUIE_A) -> Self { | ||
| 99 | variant as u8 != 0 | ||
| 100 | } | ||
| 101 | } | ||
| 102 | #[doc = "Reader of field `WKUIE`"] | ||
| 103 | pub type WKUIE_R = crate::can::bx::R<bool, WKUIE_A>; | ||
| 104 | impl WKUIE_R { | ||
| 105 | #[doc = r"Get enumerated values variant"] | ||
| 106 | #[inline(always)] | ||
| 107 | pub fn variant(&self) -> WKUIE_A { | ||
| 108 | match self.bits { | ||
| 109 | false => WKUIE_A::DISABLED, | ||
| 110 | true => WKUIE_A::ENABLED, | ||
| 111 | } | ||
| 112 | } | ||
| 113 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 114 | #[inline(always)] | ||
| 115 | pub fn is_disabled(&self) -> bool { | ||
| 116 | *self == WKUIE_A::DISABLED | ||
| 117 | } | ||
| 118 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 119 | #[inline(always)] | ||
| 120 | pub fn is_enabled(&self) -> bool { | ||
| 121 | *self == WKUIE_A::ENABLED | ||
| 122 | } | ||
| 123 | } | ||
| 124 | #[doc = "Write proxy for field `WKUIE`"] | ||
| 125 | pub struct WKUIE_W<'a> { | ||
| 126 | w: &'a mut W, | ||
| 127 | } | ||
| 128 | impl<'a> WKUIE_W<'a> { | ||
| 129 | #[doc = r"Writes `variant` to the field"] | ||
| 130 | #[inline(always)] | ||
| 131 | pub fn variant(self, variant: WKUIE_A) -> &'a mut W { | ||
| 132 | { | ||
| 133 | self.bit(variant.into()) | ||
| 134 | } | ||
| 135 | } | ||
| 136 | #[doc = "No interrupt when WKUI is set"] | ||
| 137 | #[inline(always)] | ||
| 138 | pub fn disabled(self) -> &'a mut W { | ||
| 139 | self.variant(WKUIE_A::DISABLED) | ||
| 140 | } | ||
| 141 | #[doc = "Interrupt generated when WKUI bit is set"] | ||
| 142 | #[inline(always)] | ||
| 143 | pub fn enabled(self) -> &'a mut W { | ||
| 144 | self.variant(WKUIE_A::ENABLED) | ||
| 145 | } | ||
| 146 | #[doc = r"Sets the field bit"] | ||
| 147 | #[inline(always)] | ||
| 148 | pub fn set_bit(self) -> &'a mut W { | ||
| 149 | self.bit(true) | ||
| 150 | } | ||
| 151 | #[doc = r"Clears the field bit"] | ||
| 152 | #[inline(always)] | ||
| 153 | pub fn clear_bit(self) -> &'a mut W { | ||
| 154 | self.bit(false) | ||
| 155 | } | ||
| 156 | #[doc = r"Writes raw bits to the field"] | ||
| 157 | #[inline(always)] | ||
| 158 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 159 | self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); | ||
| 160 | self.w | ||
| 161 | } | ||
| 162 | } | ||
| 163 | #[doc = "ERRIE\n\nValue on reset: 0"] | ||
| 164 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 165 | pub enum ERRIE_A { | ||
| 166 | #[doc = "0: No interrupt will be generated when an error condition is pending in the CAN_ESR"] | ||
| 167 | DISABLED = 0, | ||
| 168 | #[doc = "1: An interrupt will be generation when an error condition is pending in the CAN_ESR"] | ||
| 169 | ENABLED = 1, | ||
| 170 | } | ||
| 171 | impl From<ERRIE_A> for bool { | ||
| 172 | #[inline(always)] | ||
| 173 | fn from(variant: ERRIE_A) -> Self { | ||
| 174 | variant as u8 != 0 | ||
| 175 | } | ||
| 176 | } | ||
| 177 | #[doc = "Reader of field `ERRIE`"] | ||
| 178 | pub type ERRIE_R = crate::can::bx::R<bool, ERRIE_A>; | ||
| 179 | impl ERRIE_R { | ||
| 180 | #[doc = r"Get enumerated values variant"] | ||
| 181 | #[inline(always)] | ||
| 182 | pub fn variant(&self) -> ERRIE_A { | ||
| 183 | match self.bits { | ||
| 184 | false => ERRIE_A::DISABLED, | ||
| 185 | true => ERRIE_A::ENABLED, | ||
| 186 | } | ||
| 187 | } | ||
| 188 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn is_disabled(&self) -> bool { | ||
| 191 | *self == ERRIE_A::DISABLED | ||
| 192 | } | ||
| 193 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn is_enabled(&self) -> bool { | ||
| 196 | *self == ERRIE_A::ENABLED | ||
| 197 | } | ||
| 198 | } | ||
| 199 | #[doc = "Write proxy for field `ERRIE`"] | ||
| 200 | pub struct ERRIE_W<'a> { | ||
| 201 | w: &'a mut W, | ||
| 202 | } | ||
| 203 | impl<'a> ERRIE_W<'a> { | ||
| 204 | #[doc = r"Writes `variant` to the field"] | ||
| 205 | #[inline(always)] | ||
| 206 | pub fn variant(self, variant: ERRIE_A) -> &'a mut W { | ||
| 207 | { | ||
| 208 | self.bit(variant.into()) | ||
| 209 | } | ||
| 210 | } | ||
| 211 | #[doc = "No interrupt will be generated when an error condition is pending in the CAN_ESR"] | ||
| 212 | #[inline(always)] | ||
| 213 | pub fn disabled(self) -> &'a mut W { | ||
| 214 | self.variant(ERRIE_A::DISABLED) | ||
| 215 | } | ||
| 216 | #[doc = "An interrupt will be generation when an error condition is pending in the CAN_ESR"] | ||
| 217 | #[inline(always)] | ||
| 218 | pub fn enabled(self) -> &'a mut W { | ||
| 219 | self.variant(ERRIE_A::ENABLED) | ||
| 220 | } | ||
| 221 | #[doc = r"Sets the field bit"] | ||
| 222 | #[inline(always)] | ||
| 223 | pub fn set_bit(self) -> &'a mut W { | ||
| 224 | self.bit(true) | ||
| 225 | } | ||
| 226 | #[doc = r"Clears the field bit"] | ||
| 227 | #[inline(always)] | ||
| 228 | pub fn clear_bit(self) -> &'a mut W { | ||
| 229 | self.bit(false) | ||
| 230 | } | ||
| 231 | #[doc = r"Writes raw bits to the field"] | ||
| 232 | #[inline(always)] | ||
| 233 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 234 | self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); | ||
| 235 | self.w | ||
| 236 | } | ||
| 237 | } | ||
| 238 | #[doc = "LECIE\n\nValue on reset: 0"] | ||
| 239 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 240 | pub enum LECIE_A { | ||
| 241 | #[doc = "0: ERRI bit will not be set when the error code in LEC\\[2:0\\] | ||
| 242 | is set by hardware on error detection"] | ||
| 243 | DISABLED = 0, | ||
| 244 | #[doc = "1: ERRI bit will be set when the error code in LEC\\[2:0\\] | ||
| 245 | is set by hardware on error detection"] | ||
| 246 | ENABLED = 1, | ||
| 247 | } | ||
| 248 | impl From<LECIE_A> for bool { | ||
| 249 | #[inline(always)] | ||
| 250 | fn from(variant: LECIE_A) -> Self { | ||
| 251 | variant as u8 != 0 | ||
| 252 | } | ||
| 253 | } | ||
| 254 | #[doc = "Reader of field `LECIE`"] | ||
| 255 | pub type LECIE_R = crate::can::bx::R<bool, LECIE_A>; | ||
| 256 | impl LECIE_R { | ||
| 257 | #[doc = r"Get enumerated values variant"] | ||
| 258 | #[inline(always)] | ||
| 259 | pub fn variant(&self) -> LECIE_A { | ||
| 260 | match self.bits { | ||
| 261 | false => LECIE_A::DISABLED, | ||
| 262 | true => LECIE_A::ENABLED, | ||
| 263 | } | ||
| 264 | } | ||
| 265 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 266 | #[inline(always)] | ||
| 267 | pub fn is_disabled(&self) -> bool { | ||
| 268 | *self == LECIE_A::DISABLED | ||
| 269 | } | ||
| 270 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 271 | #[inline(always)] | ||
| 272 | pub fn is_enabled(&self) -> bool { | ||
| 273 | *self == LECIE_A::ENABLED | ||
| 274 | } | ||
| 275 | } | ||
| 276 | #[doc = "Write proxy for field `LECIE`"] | ||
| 277 | pub struct LECIE_W<'a> { | ||
| 278 | w: &'a mut W, | ||
| 279 | } | ||
| 280 | impl<'a> LECIE_W<'a> { | ||
| 281 | #[doc = r"Writes `variant` to the field"] | ||
| 282 | #[inline(always)] | ||
| 283 | pub fn variant(self, variant: LECIE_A) -> &'a mut W { | ||
| 284 | { | ||
| 285 | self.bit(variant.into()) | ||
| 286 | } | ||
| 287 | } | ||
| 288 | #[doc = "ERRI bit will not be set when the error code in LEC\\[2:0\\] | ||
| 289 | is set by hardware on error detection"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn disabled(self) -> &'a mut W { | ||
| 292 | self.variant(LECIE_A::DISABLED) | ||
| 293 | } | ||
| 294 | #[doc = "ERRI bit will be set when the error code in LEC\\[2:0\\] | ||
| 295 | is set by hardware on error detection"] | ||
| 296 | #[inline(always)] | ||
| 297 | pub fn enabled(self) -> &'a mut W { | ||
| 298 | self.variant(LECIE_A::ENABLED) | ||
| 299 | } | ||
| 300 | #[doc = r"Sets the field bit"] | ||
| 301 | #[inline(always)] | ||
| 302 | pub fn set_bit(self) -> &'a mut W { | ||
| 303 | self.bit(true) | ||
| 304 | } | ||
| 305 | #[doc = r"Clears the field bit"] | ||
| 306 | #[inline(always)] | ||
| 307 | pub fn clear_bit(self) -> &'a mut W { | ||
| 308 | self.bit(false) | ||
| 309 | } | ||
| 310 | #[doc = r"Writes raw bits to the field"] | ||
| 311 | #[inline(always)] | ||
| 312 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 313 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 314 | self.w | ||
| 315 | } | ||
| 316 | } | ||
| 317 | #[doc = "BOFIE\n\nValue on reset: 0"] | ||
| 318 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 319 | pub enum BOFIE_A { | ||
| 320 | #[doc = "0: ERRI bit will not be set when BOFF is set"] | ||
| 321 | DISABLED = 0, | ||
| 322 | #[doc = "1: ERRI bit will be set when BOFF is set"] | ||
| 323 | ENABLED = 1, | ||
| 324 | } | ||
| 325 | impl From<BOFIE_A> for bool { | ||
| 326 | #[inline(always)] | ||
| 327 | fn from(variant: BOFIE_A) -> Self { | ||
| 328 | variant as u8 != 0 | ||
| 329 | } | ||
| 330 | } | ||
| 331 | #[doc = "Reader of field `BOFIE`"] | ||
| 332 | pub type BOFIE_R = crate::can::bx::R<bool, BOFIE_A>; | ||
| 333 | impl BOFIE_R { | ||
| 334 | #[doc = r"Get enumerated values variant"] | ||
| 335 | #[inline(always)] | ||
| 336 | pub fn variant(&self) -> BOFIE_A { | ||
| 337 | match self.bits { | ||
| 338 | false => BOFIE_A::DISABLED, | ||
| 339 | true => BOFIE_A::ENABLED, | ||
| 340 | } | ||
| 341 | } | ||
| 342 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 343 | #[inline(always)] | ||
| 344 | pub fn is_disabled(&self) -> bool { | ||
| 345 | *self == BOFIE_A::DISABLED | ||
| 346 | } | ||
| 347 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 348 | #[inline(always)] | ||
| 349 | pub fn is_enabled(&self) -> bool { | ||
| 350 | *self == BOFIE_A::ENABLED | ||
| 351 | } | ||
| 352 | } | ||
| 353 | #[doc = "Write proxy for field `BOFIE`"] | ||
| 354 | pub struct BOFIE_W<'a> { | ||
| 355 | w: &'a mut W, | ||
| 356 | } | ||
| 357 | impl<'a> BOFIE_W<'a> { | ||
| 358 | #[doc = r"Writes `variant` to the field"] | ||
| 359 | #[inline(always)] | ||
| 360 | pub fn variant(self, variant: BOFIE_A) -> &'a mut W { | ||
| 361 | { | ||
| 362 | self.bit(variant.into()) | ||
| 363 | } | ||
| 364 | } | ||
| 365 | #[doc = "ERRI bit will not be set when BOFF is set"] | ||
| 366 | #[inline(always)] | ||
| 367 | pub fn disabled(self) -> &'a mut W { | ||
| 368 | self.variant(BOFIE_A::DISABLED) | ||
| 369 | } | ||
| 370 | #[doc = "ERRI bit will be set when BOFF is set"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn enabled(self) -> &'a mut W { | ||
| 373 | self.variant(BOFIE_A::ENABLED) | ||
| 374 | } | ||
| 375 | #[doc = r"Sets the field bit"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn set_bit(self) -> &'a mut W { | ||
| 378 | self.bit(true) | ||
| 379 | } | ||
| 380 | #[doc = r"Clears the field bit"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn clear_bit(self) -> &'a mut W { | ||
| 383 | self.bit(false) | ||
| 384 | } | ||
| 385 | #[doc = r"Writes raw bits to the field"] | ||
| 386 | #[inline(always)] | ||
| 387 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 388 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 389 | self.w | ||
| 390 | } | ||
| 391 | } | ||
| 392 | #[doc = "EPVIE\n\nValue on reset: 0"] | ||
| 393 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 394 | pub enum EPVIE_A { | ||
| 395 | #[doc = "0: ERRI bit will not be set when EPVF is set"] | ||
| 396 | DISABLED = 0, | ||
| 397 | #[doc = "1: ERRI bit will be set when EPVF is set"] | ||
| 398 | ENABLED = 1, | ||
| 399 | } | ||
| 400 | impl From<EPVIE_A> for bool { | ||
| 401 | #[inline(always)] | ||
| 402 | fn from(variant: EPVIE_A) -> Self { | ||
| 403 | variant as u8 != 0 | ||
| 404 | } | ||
| 405 | } | ||
| 406 | #[doc = "Reader of field `EPVIE`"] | ||
| 407 | pub type EPVIE_R = crate::can::bx::R<bool, EPVIE_A>; | ||
| 408 | impl EPVIE_R { | ||
| 409 | #[doc = r"Get enumerated values variant"] | ||
| 410 | #[inline(always)] | ||
| 411 | pub fn variant(&self) -> EPVIE_A { | ||
| 412 | match self.bits { | ||
| 413 | false => EPVIE_A::DISABLED, | ||
| 414 | true => EPVIE_A::ENABLED, | ||
| 415 | } | ||
| 416 | } | ||
| 417 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 418 | #[inline(always)] | ||
| 419 | pub fn is_disabled(&self) -> bool { | ||
| 420 | *self == EPVIE_A::DISABLED | ||
| 421 | } | ||
| 422 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 423 | #[inline(always)] | ||
| 424 | pub fn is_enabled(&self) -> bool { | ||
| 425 | *self == EPVIE_A::ENABLED | ||
| 426 | } | ||
| 427 | } | ||
| 428 | #[doc = "Write proxy for field `EPVIE`"] | ||
| 429 | pub struct EPVIE_W<'a> { | ||
| 430 | w: &'a mut W, | ||
| 431 | } | ||
| 432 | impl<'a> EPVIE_W<'a> { | ||
| 433 | #[doc = r"Writes `variant` to the field"] | ||
| 434 | #[inline(always)] | ||
| 435 | pub fn variant(self, variant: EPVIE_A) -> &'a mut W { | ||
| 436 | { | ||
| 437 | self.bit(variant.into()) | ||
| 438 | } | ||
| 439 | } | ||
| 440 | #[doc = "ERRI bit will not be set when EPVF is set"] | ||
| 441 | #[inline(always)] | ||
| 442 | pub fn disabled(self) -> &'a mut W { | ||
| 443 | self.variant(EPVIE_A::DISABLED) | ||
| 444 | } | ||
| 445 | #[doc = "ERRI bit will be set when EPVF is set"] | ||
| 446 | #[inline(always)] | ||
| 447 | pub fn enabled(self) -> &'a mut W { | ||
| 448 | self.variant(EPVIE_A::ENABLED) | ||
| 449 | } | ||
| 450 | #[doc = r"Sets the field bit"] | ||
| 451 | #[inline(always)] | ||
| 452 | pub fn set_bit(self) -> &'a mut W { | ||
| 453 | self.bit(true) | ||
| 454 | } | ||
| 455 | #[doc = r"Clears the field bit"] | ||
| 456 | #[inline(always)] | ||
| 457 | pub fn clear_bit(self) -> &'a mut W { | ||
| 458 | self.bit(false) | ||
| 459 | } | ||
| 460 | #[doc = r"Writes raw bits to the field"] | ||
| 461 | #[inline(always)] | ||
| 462 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 463 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 464 | self.w | ||
| 465 | } | ||
| 466 | } | ||
| 467 | #[doc = "EWGIE\n\nValue on reset: 0"] | ||
| 468 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 469 | pub enum EWGIE_A { | ||
| 470 | #[doc = "0: ERRI bit will not be set when EWGF is set"] | ||
| 471 | DISABLED = 0, | ||
| 472 | #[doc = "1: ERRI bit will be set when EWGF is set"] | ||
| 473 | ENABLED = 1, | ||
| 474 | } | ||
| 475 | impl From<EWGIE_A> for bool { | ||
| 476 | #[inline(always)] | ||
| 477 | fn from(variant: EWGIE_A) -> Self { | ||
| 478 | variant as u8 != 0 | ||
| 479 | } | ||
| 480 | } | ||
| 481 | #[doc = "Reader of field `EWGIE`"] | ||
| 482 | pub type EWGIE_R = crate::can::bx::R<bool, EWGIE_A>; | ||
| 483 | impl EWGIE_R { | ||
| 484 | #[doc = r"Get enumerated values variant"] | ||
| 485 | #[inline(always)] | ||
| 486 | pub fn variant(&self) -> EWGIE_A { | ||
| 487 | match self.bits { | ||
| 488 | false => EWGIE_A::DISABLED, | ||
| 489 | true => EWGIE_A::ENABLED, | ||
| 490 | } | ||
| 491 | } | ||
| 492 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 493 | #[inline(always)] | ||
| 494 | pub fn is_disabled(&self) -> bool { | ||
| 495 | *self == EWGIE_A::DISABLED | ||
| 496 | } | ||
| 497 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 498 | #[inline(always)] | ||
| 499 | pub fn is_enabled(&self) -> bool { | ||
| 500 | *self == EWGIE_A::ENABLED | ||
| 501 | } | ||
| 502 | } | ||
| 503 | #[doc = "Write proxy for field `EWGIE`"] | ||
| 504 | pub struct EWGIE_W<'a> { | ||
| 505 | w: &'a mut W, | ||
| 506 | } | ||
| 507 | impl<'a> EWGIE_W<'a> { | ||
| 508 | #[doc = r"Writes `variant` to the field"] | ||
| 509 | #[inline(always)] | ||
| 510 | pub fn variant(self, variant: EWGIE_A) -> &'a mut W { | ||
| 511 | { | ||
| 512 | self.bit(variant.into()) | ||
| 513 | } | ||
| 514 | } | ||
| 515 | #[doc = "ERRI bit will not be set when EWGF is set"] | ||
| 516 | #[inline(always)] | ||
| 517 | pub fn disabled(self) -> &'a mut W { | ||
| 518 | self.variant(EWGIE_A::DISABLED) | ||
| 519 | } | ||
| 520 | #[doc = "ERRI bit will be set when EWGF is set"] | ||
| 521 | #[inline(always)] | ||
| 522 | pub fn enabled(self) -> &'a mut W { | ||
| 523 | self.variant(EWGIE_A::ENABLED) | ||
| 524 | } | ||
| 525 | #[doc = r"Sets the field bit"] | ||
| 526 | #[inline(always)] | ||
| 527 | pub fn set_bit(self) -> &'a mut W { | ||
| 528 | self.bit(true) | ||
| 529 | } | ||
| 530 | #[doc = r"Clears the field bit"] | ||
| 531 | #[inline(always)] | ||
| 532 | pub fn clear_bit(self) -> &'a mut W { | ||
| 533 | self.bit(false) | ||
| 534 | } | ||
| 535 | #[doc = r"Writes raw bits to the field"] | ||
| 536 | #[inline(always)] | ||
| 537 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 538 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 539 | self.w | ||
| 540 | } | ||
| 541 | } | ||
| 542 | #[doc = "FOVIE1\n\nValue on reset: 0"] | ||
| 543 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 544 | pub enum FOVIE1_A { | ||
| 545 | #[doc = "0: No interrupt when FOVR is set"] | ||
| 546 | DISABLED = 0, | ||
| 547 | #[doc = "1: Interrupt generation when FOVR is set"] | ||
| 548 | ENABLED = 1, | ||
| 549 | } | ||
| 550 | impl From<FOVIE1_A> for bool { | ||
| 551 | #[inline(always)] | ||
| 552 | fn from(variant: FOVIE1_A) -> Self { | ||
| 553 | variant as u8 != 0 | ||
| 554 | } | ||
| 555 | } | ||
| 556 | #[doc = "Reader of field `FOVIE1`"] | ||
| 557 | pub type FOVIE1_R = crate::can::bx::R<bool, FOVIE1_A>; | ||
| 558 | impl FOVIE1_R { | ||
| 559 | #[doc = r"Get enumerated values variant"] | ||
| 560 | #[inline(always)] | ||
| 561 | pub fn variant(&self) -> FOVIE1_A { | ||
| 562 | match self.bits { | ||
| 563 | false => FOVIE1_A::DISABLED, | ||
| 564 | true => FOVIE1_A::ENABLED, | ||
| 565 | } | ||
| 566 | } | ||
| 567 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 568 | #[inline(always)] | ||
| 569 | pub fn is_disabled(&self) -> bool { | ||
| 570 | *self == FOVIE1_A::DISABLED | ||
| 571 | } | ||
| 572 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 573 | #[inline(always)] | ||
| 574 | pub fn is_enabled(&self) -> bool { | ||
| 575 | *self == FOVIE1_A::ENABLED | ||
| 576 | } | ||
| 577 | } | ||
| 578 | #[doc = "Write proxy for field `FOVIE1`"] | ||
| 579 | pub struct FOVIE1_W<'a> { | ||
| 580 | w: &'a mut W, | ||
| 581 | } | ||
| 582 | impl<'a> FOVIE1_W<'a> { | ||
| 583 | #[doc = r"Writes `variant` to the field"] | ||
| 584 | #[inline(always)] | ||
| 585 | pub fn variant(self, variant: FOVIE1_A) -> &'a mut W { | ||
| 586 | { | ||
| 587 | self.bit(variant.into()) | ||
| 588 | } | ||
| 589 | } | ||
| 590 | #[doc = "No interrupt when FOVR is set"] | ||
| 591 | #[inline(always)] | ||
| 592 | pub fn disabled(self) -> &'a mut W { | ||
| 593 | self.variant(FOVIE1_A::DISABLED) | ||
| 594 | } | ||
| 595 | #[doc = "Interrupt generation when FOVR is set"] | ||
| 596 | #[inline(always)] | ||
| 597 | pub fn enabled(self) -> &'a mut W { | ||
| 598 | self.variant(FOVIE1_A::ENABLED) | ||
| 599 | } | ||
| 600 | #[doc = r"Sets the field bit"] | ||
| 601 | #[inline(always)] | ||
| 602 | pub fn set_bit(self) -> &'a mut W { | ||
| 603 | self.bit(true) | ||
| 604 | } | ||
| 605 | #[doc = r"Clears the field bit"] | ||
| 606 | #[inline(always)] | ||
| 607 | pub fn clear_bit(self) -> &'a mut W { | ||
| 608 | self.bit(false) | ||
| 609 | } | ||
| 610 | #[doc = r"Writes raw bits to the field"] | ||
| 611 | #[inline(always)] | ||
| 612 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 613 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 614 | self.w | ||
| 615 | } | ||
| 616 | } | ||
| 617 | #[doc = "FFIE1\n\nValue on reset: 0"] | ||
| 618 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 619 | pub enum FFIE1_A { | ||
| 620 | #[doc = "0: No interrupt when FULL bit is set"] | ||
| 621 | DISABLED = 0, | ||
| 622 | #[doc = "1: Interrupt generated when FULL bit is set"] | ||
| 623 | ENABLED = 1, | ||
| 624 | } | ||
| 625 | impl From<FFIE1_A> for bool { | ||
| 626 | #[inline(always)] | ||
| 627 | fn from(variant: FFIE1_A) -> Self { | ||
| 628 | variant as u8 != 0 | ||
| 629 | } | ||
| 630 | } | ||
| 631 | #[doc = "Reader of field `FFIE1`"] | ||
| 632 | pub type FFIE1_R = crate::can::bx::R<bool, FFIE1_A>; | ||
| 633 | impl FFIE1_R { | ||
| 634 | #[doc = r"Get enumerated values variant"] | ||
| 635 | #[inline(always)] | ||
| 636 | pub fn variant(&self) -> FFIE1_A { | ||
| 637 | match self.bits { | ||
| 638 | false => FFIE1_A::DISABLED, | ||
| 639 | true => FFIE1_A::ENABLED, | ||
| 640 | } | ||
| 641 | } | ||
| 642 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 643 | #[inline(always)] | ||
| 644 | pub fn is_disabled(&self) -> bool { | ||
| 645 | *self == FFIE1_A::DISABLED | ||
| 646 | } | ||
| 647 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 648 | #[inline(always)] | ||
| 649 | pub fn is_enabled(&self) -> bool { | ||
| 650 | *self == FFIE1_A::ENABLED | ||
| 651 | } | ||
| 652 | } | ||
| 653 | #[doc = "Write proxy for field `FFIE1`"] | ||
| 654 | pub struct FFIE1_W<'a> { | ||
| 655 | w: &'a mut W, | ||
| 656 | } | ||
| 657 | impl<'a> FFIE1_W<'a> { | ||
| 658 | #[doc = r"Writes `variant` to the field"] | ||
| 659 | #[inline(always)] | ||
| 660 | pub fn variant(self, variant: FFIE1_A) -> &'a mut W { | ||
| 661 | { | ||
| 662 | self.bit(variant.into()) | ||
| 663 | } | ||
| 664 | } | ||
| 665 | #[doc = "No interrupt when FULL bit is set"] | ||
| 666 | #[inline(always)] | ||
| 667 | pub fn disabled(self) -> &'a mut W { | ||
| 668 | self.variant(FFIE1_A::DISABLED) | ||
| 669 | } | ||
| 670 | #[doc = "Interrupt generated when FULL bit is set"] | ||
| 671 | #[inline(always)] | ||
| 672 | pub fn enabled(self) -> &'a mut W { | ||
| 673 | self.variant(FFIE1_A::ENABLED) | ||
| 674 | } | ||
| 675 | #[doc = r"Sets the field bit"] | ||
| 676 | #[inline(always)] | ||
| 677 | pub fn set_bit(self) -> &'a mut W { | ||
| 678 | self.bit(true) | ||
| 679 | } | ||
| 680 | #[doc = r"Clears the field bit"] | ||
| 681 | #[inline(always)] | ||
| 682 | pub fn clear_bit(self) -> &'a mut W { | ||
| 683 | self.bit(false) | ||
| 684 | } | ||
| 685 | #[doc = r"Writes raw bits to the field"] | ||
| 686 | #[inline(always)] | ||
| 687 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 688 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 689 | self.w | ||
| 690 | } | ||
| 691 | } | ||
| 692 | #[doc = "FMPIE1\n\nValue on reset: 0"] | ||
| 693 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 694 | pub enum FMPIE1_A { | ||
| 695 | #[doc = "0: No interrupt generated when state of FMP\\[1:0\\] | ||
| 696 | bits are not 00b"] | ||
| 697 | DISABLED = 0, | ||
| 698 | #[doc = "1: Interrupt generated when state of FMP\\[1:0\\] | ||
| 699 | bits are not 00b"] | ||
| 700 | ENABLED = 1, | ||
| 701 | } | ||
| 702 | impl From<FMPIE1_A> for bool { | ||
| 703 | #[inline(always)] | ||
| 704 | fn from(variant: FMPIE1_A) -> Self { | ||
| 705 | variant as u8 != 0 | ||
| 706 | } | ||
| 707 | } | ||
| 708 | #[doc = "Reader of field `FMPIE1`"] | ||
| 709 | pub type FMPIE1_R = crate::can::bx::R<bool, FMPIE1_A>; | ||
| 710 | impl FMPIE1_R { | ||
| 711 | #[doc = r"Get enumerated values variant"] | ||
| 712 | #[inline(always)] | ||
| 713 | pub fn variant(&self) -> FMPIE1_A { | ||
| 714 | match self.bits { | ||
| 715 | false => FMPIE1_A::DISABLED, | ||
| 716 | true => FMPIE1_A::ENABLED, | ||
| 717 | } | ||
| 718 | } | ||
| 719 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 720 | #[inline(always)] | ||
| 721 | pub fn is_disabled(&self) -> bool { | ||
| 722 | *self == FMPIE1_A::DISABLED | ||
| 723 | } | ||
| 724 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 725 | #[inline(always)] | ||
| 726 | pub fn is_enabled(&self) -> bool { | ||
| 727 | *self == FMPIE1_A::ENABLED | ||
| 728 | } | ||
| 729 | } | ||
| 730 | #[doc = "Write proxy for field `FMPIE1`"] | ||
| 731 | pub struct FMPIE1_W<'a> { | ||
| 732 | w: &'a mut W, | ||
| 733 | } | ||
| 734 | impl<'a> FMPIE1_W<'a> { | ||
| 735 | #[doc = r"Writes `variant` to the field"] | ||
| 736 | #[inline(always)] | ||
| 737 | pub fn variant(self, variant: FMPIE1_A) -> &'a mut W { | ||
| 738 | { | ||
| 739 | self.bit(variant.into()) | ||
| 740 | } | ||
| 741 | } | ||
| 742 | #[doc = "No interrupt generated when state of FMP\\[1:0\\] | ||
| 743 | bits are not 00b"] | ||
| 744 | #[inline(always)] | ||
| 745 | pub fn disabled(self) -> &'a mut W { | ||
| 746 | self.variant(FMPIE1_A::DISABLED) | ||
| 747 | } | ||
| 748 | #[doc = "Interrupt generated when state of FMP\\[1:0\\] | ||
| 749 | bits are not 00b"] | ||
| 750 | #[inline(always)] | ||
| 751 | pub fn enabled(self) -> &'a mut W { | ||
| 752 | self.variant(FMPIE1_A::ENABLED) | ||
| 753 | } | ||
| 754 | #[doc = r"Sets the field bit"] | ||
| 755 | #[inline(always)] | ||
| 756 | pub fn set_bit(self) -> &'a mut W { | ||
| 757 | self.bit(true) | ||
| 758 | } | ||
| 759 | #[doc = r"Clears the field bit"] | ||
| 760 | #[inline(always)] | ||
| 761 | pub fn clear_bit(self) -> &'a mut W { | ||
| 762 | self.bit(false) | ||
| 763 | } | ||
| 764 | #[doc = r"Writes raw bits to the field"] | ||
| 765 | #[inline(always)] | ||
| 766 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 767 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 768 | self.w | ||
| 769 | } | ||
| 770 | } | ||
| 771 | #[doc = "FOVIE0\n\nValue on reset: 0"] | ||
| 772 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 773 | pub enum FOVIE0_A { | ||
| 774 | #[doc = "0: No interrupt when FOVR bit is set"] | ||
| 775 | DISABLED = 0, | ||
| 776 | #[doc = "1: Interrupt generated when FOVR bit is set"] | ||
| 777 | ENABLED = 1, | ||
| 778 | } | ||
| 779 | impl From<FOVIE0_A> for bool { | ||
| 780 | #[inline(always)] | ||
| 781 | fn from(variant: FOVIE0_A) -> Self { | ||
| 782 | variant as u8 != 0 | ||
| 783 | } | ||
| 784 | } | ||
| 785 | #[doc = "Reader of field `FOVIE0`"] | ||
| 786 | pub type FOVIE0_R = crate::can::bx::R<bool, FOVIE0_A>; | ||
| 787 | impl FOVIE0_R { | ||
| 788 | #[doc = r"Get enumerated values variant"] | ||
| 789 | #[inline(always)] | ||
| 790 | pub fn variant(&self) -> FOVIE0_A { | ||
| 791 | match self.bits { | ||
| 792 | false => FOVIE0_A::DISABLED, | ||
| 793 | true => FOVIE0_A::ENABLED, | ||
| 794 | } | ||
| 795 | } | ||
| 796 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 797 | #[inline(always)] | ||
| 798 | pub fn is_disabled(&self) -> bool { | ||
| 799 | *self == FOVIE0_A::DISABLED | ||
| 800 | } | ||
| 801 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 802 | #[inline(always)] | ||
| 803 | pub fn is_enabled(&self) -> bool { | ||
| 804 | *self == FOVIE0_A::ENABLED | ||
| 805 | } | ||
| 806 | } | ||
| 807 | #[doc = "Write proxy for field `FOVIE0`"] | ||
| 808 | pub struct FOVIE0_W<'a> { | ||
| 809 | w: &'a mut W, | ||
| 810 | } | ||
| 811 | impl<'a> FOVIE0_W<'a> { | ||
| 812 | #[doc = r"Writes `variant` to the field"] | ||
| 813 | #[inline(always)] | ||
| 814 | pub fn variant(self, variant: FOVIE0_A) -> &'a mut W { | ||
| 815 | { | ||
| 816 | self.bit(variant.into()) | ||
| 817 | } | ||
| 818 | } | ||
| 819 | #[doc = "No interrupt when FOVR bit is set"] | ||
| 820 | #[inline(always)] | ||
| 821 | pub fn disabled(self) -> &'a mut W { | ||
| 822 | self.variant(FOVIE0_A::DISABLED) | ||
| 823 | } | ||
| 824 | #[doc = "Interrupt generated when FOVR bit is set"] | ||
| 825 | #[inline(always)] | ||
| 826 | pub fn enabled(self) -> &'a mut W { | ||
| 827 | self.variant(FOVIE0_A::ENABLED) | ||
| 828 | } | ||
| 829 | #[doc = r"Sets the field bit"] | ||
| 830 | #[inline(always)] | ||
| 831 | pub fn set_bit(self) -> &'a mut W { | ||
| 832 | self.bit(true) | ||
| 833 | } | ||
| 834 | #[doc = r"Clears the field bit"] | ||
| 835 | #[inline(always)] | ||
| 836 | pub fn clear_bit(self) -> &'a mut W { | ||
| 837 | self.bit(false) | ||
| 838 | } | ||
| 839 | #[doc = r"Writes raw bits to the field"] | ||
| 840 | #[inline(always)] | ||
| 841 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 842 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 843 | self.w | ||
| 844 | } | ||
| 845 | } | ||
| 846 | #[doc = "FFIE0\n\nValue on reset: 0"] | ||
| 847 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 848 | pub enum FFIE0_A { | ||
| 849 | #[doc = "0: No interrupt when FULL bit is set"] | ||
| 850 | DISABLED = 0, | ||
| 851 | #[doc = "1: Interrupt generated when FULL bit is set"] | ||
| 852 | ENABLED = 1, | ||
| 853 | } | ||
| 854 | impl From<FFIE0_A> for bool { | ||
| 855 | #[inline(always)] | ||
| 856 | fn from(variant: FFIE0_A) -> Self { | ||
| 857 | variant as u8 != 0 | ||
| 858 | } | ||
| 859 | } | ||
| 860 | #[doc = "Reader of field `FFIE0`"] | ||
| 861 | pub type FFIE0_R = crate::can::bx::R<bool, FFIE0_A>; | ||
| 862 | impl FFIE0_R { | ||
| 863 | #[doc = r"Get enumerated values variant"] | ||
| 864 | #[inline(always)] | ||
| 865 | pub fn variant(&self) -> FFIE0_A { | ||
| 866 | match self.bits { | ||
| 867 | false => FFIE0_A::DISABLED, | ||
| 868 | true => FFIE0_A::ENABLED, | ||
| 869 | } | ||
| 870 | } | ||
| 871 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 872 | #[inline(always)] | ||
| 873 | pub fn is_disabled(&self) -> bool { | ||
| 874 | *self == FFIE0_A::DISABLED | ||
| 875 | } | ||
| 876 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 877 | #[inline(always)] | ||
| 878 | pub fn is_enabled(&self) -> bool { | ||
| 879 | *self == FFIE0_A::ENABLED | ||
| 880 | } | ||
| 881 | } | ||
| 882 | #[doc = "Write proxy for field `FFIE0`"] | ||
| 883 | pub struct FFIE0_W<'a> { | ||
| 884 | w: &'a mut W, | ||
| 885 | } | ||
| 886 | impl<'a> FFIE0_W<'a> { | ||
| 887 | #[doc = r"Writes `variant` to the field"] | ||
| 888 | #[inline(always)] | ||
| 889 | pub fn variant(self, variant: FFIE0_A) -> &'a mut W { | ||
| 890 | { | ||
| 891 | self.bit(variant.into()) | ||
| 892 | } | ||
| 893 | } | ||
| 894 | #[doc = "No interrupt when FULL bit is set"] | ||
| 895 | #[inline(always)] | ||
| 896 | pub fn disabled(self) -> &'a mut W { | ||
| 897 | self.variant(FFIE0_A::DISABLED) | ||
| 898 | } | ||
| 899 | #[doc = "Interrupt generated when FULL bit is set"] | ||
| 900 | #[inline(always)] | ||
| 901 | pub fn enabled(self) -> &'a mut W { | ||
| 902 | self.variant(FFIE0_A::ENABLED) | ||
| 903 | } | ||
| 904 | #[doc = r"Sets the field bit"] | ||
| 905 | #[inline(always)] | ||
| 906 | pub fn set_bit(self) -> &'a mut W { | ||
| 907 | self.bit(true) | ||
| 908 | } | ||
| 909 | #[doc = r"Clears the field bit"] | ||
| 910 | #[inline(always)] | ||
| 911 | pub fn clear_bit(self) -> &'a mut W { | ||
| 912 | self.bit(false) | ||
| 913 | } | ||
| 914 | #[doc = r"Writes raw bits to the field"] | ||
| 915 | #[inline(always)] | ||
| 916 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 917 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 918 | self.w | ||
| 919 | } | ||
| 920 | } | ||
| 921 | #[doc = "FMPIE0\n\nValue on reset: 0"] | ||
| 922 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 923 | pub enum FMPIE0_A { | ||
| 924 | #[doc = "0: No interrupt generated when state of FMP\\[1:0\\] | ||
| 925 | bits are not 00"] | ||
| 926 | DISABLED = 0, | ||
| 927 | #[doc = "1: Interrupt generated when state of FMP\\[1:0\\] | ||
| 928 | bits are not 00b"] | ||
| 929 | ENABLED = 1, | ||
| 930 | } | ||
| 931 | impl From<FMPIE0_A> for bool { | ||
| 932 | #[inline(always)] | ||
| 933 | fn from(variant: FMPIE0_A) -> Self { | ||
| 934 | variant as u8 != 0 | ||
| 935 | } | ||
| 936 | } | ||
| 937 | #[doc = "Reader of field `FMPIE0`"] | ||
| 938 | pub type FMPIE0_R = crate::can::bx::R<bool, FMPIE0_A>; | ||
| 939 | impl FMPIE0_R { | ||
| 940 | #[doc = r"Get enumerated values variant"] | ||
| 941 | #[inline(always)] | ||
| 942 | pub fn variant(&self) -> FMPIE0_A { | ||
| 943 | match self.bits { | ||
| 944 | false => FMPIE0_A::DISABLED, | ||
| 945 | true => FMPIE0_A::ENABLED, | ||
| 946 | } | ||
| 947 | } | ||
| 948 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 949 | #[inline(always)] | ||
| 950 | pub fn is_disabled(&self) -> bool { | ||
| 951 | *self == FMPIE0_A::DISABLED | ||
| 952 | } | ||
| 953 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 954 | #[inline(always)] | ||
| 955 | pub fn is_enabled(&self) -> bool { | ||
| 956 | *self == FMPIE0_A::ENABLED | ||
| 957 | } | ||
| 958 | } | ||
| 959 | #[doc = "Write proxy for field `FMPIE0`"] | ||
| 960 | pub struct FMPIE0_W<'a> { | ||
| 961 | w: &'a mut W, | ||
| 962 | } | ||
| 963 | impl<'a> FMPIE0_W<'a> { | ||
| 964 | #[doc = r"Writes `variant` to the field"] | ||
| 965 | #[inline(always)] | ||
| 966 | pub fn variant(self, variant: FMPIE0_A) -> &'a mut W { | ||
| 967 | { | ||
| 968 | self.bit(variant.into()) | ||
| 969 | } | ||
| 970 | } | ||
| 971 | #[doc = "No interrupt generated when state of FMP\\[1:0\\] | ||
| 972 | bits are not 00"] | ||
| 973 | #[inline(always)] | ||
| 974 | pub fn disabled(self) -> &'a mut W { | ||
| 975 | self.variant(FMPIE0_A::DISABLED) | ||
| 976 | } | ||
| 977 | #[doc = "Interrupt generated when state of FMP\\[1:0\\] | ||
| 978 | bits are not 00b"] | ||
| 979 | #[inline(always)] | ||
| 980 | pub fn enabled(self) -> &'a mut W { | ||
| 981 | self.variant(FMPIE0_A::ENABLED) | ||
| 982 | } | ||
| 983 | #[doc = r"Sets the field bit"] | ||
| 984 | #[inline(always)] | ||
| 985 | pub fn set_bit(self) -> &'a mut W { | ||
| 986 | self.bit(true) | ||
| 987 | } | ||
| 988 | #[doc = r"Clears the field bit"] | ||
| 989 | #[inline(always)] | ||
| 990 | pub fn clear_bit(self) -> &'a mut W { | ||
| 991 | self.bit(false) | ||
| 992 | } | ||
| 993 | #[doc = r"Writes raw bits to the field"] | ||
| 994 | #[inline(always)] | ||
| 995 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 996 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 997 | self.w | ||
| 998 | } | ||
| 999 | } | ||
| 1000 | #[doc = "TMEIE\n\nValue on reset: 0"] | ||
| 1001 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 1002 | pub enum TMEIE_A { | ||
| 1003 | #[doc = "0: No interrupt when RQCPx bit is set"] | ||
| 1004 | DISABLED = 0, | ||
| 1005 | #[doc = "1: Interrupt generated when RQCPx bit is set"] | ||
| 1006 | ENABLED = 1, | ||
| 1007 | } | ||
| 1008 | impl From<TMEIE_A> for bool { | ||
| 1009 | #[inline(always)] | ||
| 1010 | fn from(variant: TMEIE_A) -> Self { | ||
| 1011 | variant as u8 != 0 | ||
| 1012 | } | ||
| 1013 | } | ||
| 1014 | #[doc = "Reader of field `TMEIE`"] | ||
| 1015 | pub type TMEIE_R = crate::can::bx::R<bool, TMEIE_A>; | ||
| 1016 | impl TMEIE_R { | ||
| 1017 | #[doc = r"Get enumerated values variant"] | ||
| 1018 | #[inline(always)] | ||
| 1019 | pub fn variant(&self) -> TMEIE_A { | ||
| 1020 | match self.bits { | ||
| 1021 | false => TMEIE_A::DISABLED, | ||
| 1022 | true => TMEIE_A::ENABLED, | ||
| 1023 | } | ||
| 1024 | } | ||
| 1025 | #[doc = "Checks if the value of the field is `DISABLED`"] | ||
| 1026 | #[inline(always)] | ||
| 1027 | pub fn is_disabled(&self) -> bool { | ||
| 1028 | *self == TMEIE_A::DISABLED | ||
| 1029 | } | ||
| 1030 | #[doc = "Checks if the value of the field is `ENABLED`"] | ||
| 1031 | #[inline(always)] | ||
| 1032 | pub fn is_enabled(&self) -> bool { | ||
| 1033 | *self == TMEIE_A::ENABLED | ||
| 1034 | } | ||
| 1035 | } | ||
| 1036 | #[doc = "Write proxy for field `TMEIE`"] | ||
| 1037 | pub struct TMEIE_W<'a> { | ||
| 1038 | w: &'a mut W, | ||
| 1039 | } | ||
| 1040 | impl<'a> TMEIE_W<'a> { | ||
| 1041 | #[doc = r"Writes `variant` to the field"] | ||
| 1042 | #[inline(always)] | ||
| 1043 | pub fn variant(self, variant: TMEIE_A) -> &'a mut W { | ||
| 1044 | { | ||
| 1045 | self.bit(variant.into()) | ||
| 1046 | } | ||
| 1047 | } | ||
| 1048 | #[doc = "No interrupt when RQCPx bit is set"] | ||
| 1049 | #[inline(always)] | ||
| 1050 | pub fn disabled(self) -> &'a mut W { | ||
| 1051 | self.variant(TMEIE_A::DISABLED) | ||
| 1052 | } | ||
| 1053 | #[doc = "Interrupt generated when RQCPx bit is set"] | ||
| 1054 | #[inline(always)] | ||
| 1055 | pub fn enabled(self) -> &'a mut W { | ||
| 1056 | self.variant(TMEIE_A::ENABLED) | ||
| 1057 | } | ||
| 1058 | #[doc = r"Sets the field bit"] | ||
| 1059 | #[inline(always)] | ||
| 1060 | pub fn set_bit(self) -> &'a mut W { | ||
| 1061 | self.bit(true) | ||
| 1062 | } | ||
| 1063 | #[doc = r"Clears the field bit"] | ||
| 1064 | #[inline(always)] | ||
| 1065 | pub fn clear_bit(self) -> &'a mut W { | ||
| 1066 | self.bit(false) | ||
| 1067 | } | ||
| 1068 | #[doc = r"Writes raw bits to the field"] | ||
| 1069 | #[inline(always)] | ||
| 1070 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 1071 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 1072 | self.w | ||
| 1073 | } | ||
| 1074 | } | ||
| 1075 | impl R { | ||
| 1076 | #[doc = "Bit 17 - SLKIE"] | ||
| 1077 | #[inline(always)] | ||
| 1078 | pub fn slkie(&self) -> SLKIE_R { | ||
| 1079 | SLKIE_R::new(((self.bits >> 17) & 0x01) != 0) | ||
| 1080 | } | ||
| 1081 | #[doc = "Bit 16 - WKUIE"] | ||
| 1082 | #[inline(always)] | ||
| 1083 | pub fn wkuie(&self) -> WKUIE_R { | ||
| 1084 | WKUIE_R::new(((self.bits >> 16) & 0x01) != 0) | ||
| 1085 | } | ||
| 1086 | #[doc = "Bit 15 - ERRIE"] | ||
| 1087 | #[inline(always)] | ||
| 1088 | pub fn errie(&self) -> ERRIE_R { | ||
| 1089 | ERRIE_R::new(((self.bits >> 15) & 0x01) != 0) | ||
| 1090 | } | ||
| 1091 | #[doc = "Bit 11 - LECIE"] | ||
| 1092 | #[inline(always)] | ||
| 1093 | pub fn lecie(&self) -> LECIE_R { | ||
| 1094 | LECIE_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 1095 | } | ||
| 1096 | #[doc = "Bit 10 - BOFIE"] | ||
| 1097 | #[inline(always)] | ||
| 1098 | pub fn bofie(&self) -> BOFIE_R { | ||
| 1099 | BOFIE_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 1100 | } | ||
| 1101 | #[doc = "Bit 9 - EPVIE"] | ||
| 1102 | #[inline(always)] | ||
| 1103 | pub fn epvie(&self) -> EPVIE_R { | ||
| 1104 | EPVIE_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 1105 | } | ||
| 1106 | #[doc = "Bit 8 - EWGIE"] | ||
| 1107 | #[inline(always)] | ||
| 1108 | pub fn ewgie(&self) -> EWGIE_R { | ||
| 1109 | EWGIE_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 1110 | } | ||
| 1111 | #[doc = "Bit 6 - FOVIE1"] | ||
| 1112 | #[inline(always)] | ||
| 1113 | pub fn fovie1(&self) -> FOVIE1_R { | ||
| 1114 | FOVIE1_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 1115 | } | ||
| 1116 | #[doc = "Bit 5 - FFIE1"] | ||
| 1117 | #[inline(always)] | ||
| 1118 | pub fn ffie1(&self) -> FFIE1_R { | ||
| 1119 | FFIE1_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 1120 | } | ||
| 1121 | #[doc = "Bit 4 - FMPIE1"] | ||
| 1122 | #[inline(always)] | ||
| 1123 | pub fn fmpie1(&self) -> FMPIE1_R { | ||
| 1124 | FMPIE1_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 1125 | } | ||
| 1126 | #[doc = "Bit 3 - FOVIE0"] | ||
| 1127 | #[inline(always)] | ||
| 1128 | pub fn fovie0(&self) -> FOVIE0_R { | ||
| 1129 | FOVIE0_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 1130 | } | ||
| 1131 | #[doc = "Bit 2 - FFIE0"] | ||
| 1132 | #[inline(always)] | ||
| 1133 | pub fn ffie0(&self) -> FFIE0_R { | ||
| 1134 | FFIE0_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 1135 | } | ||
| 1136 | #[doc = "Bit 1 - FMPIE0"] | ||
| 1137 | #[inline(always)] | ||
| 1138 | pub fn fmpie0(&self) -> FMPIE0_R { | ||
| 1139 | FMPIE0_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 1140 | } | ||
| 1141 | #[doc = "Bit 0 - TMEIE"] | ||
| 1142 | #[inline(always)] | ||
| 1143 | pub fn tmeie(&self) -> TMEIE_R { | ||
| 1144 | TMEIE_R::new((self.bits & 0x01) != 0) | ||
| 1145 | } | ||
| 1146 | } | ||
| 1147 | impl W { | ||
| 1148 | #[doc = "Bit 17 - SLKIE"] | ||
| 1149 | #[inline(always)] | ||
| 1150 | pub fn slkie(&mut self) -> SLKIE_W { | ||
| 1151 | SLKIE_W { w: self } | ||
| 1152 | } | ||
| 1153 | #[doc = "Bit 16 - WKUIE"] | ||
| 1154 | #[inline(always)] | ||
| 1155 | pub fn wkuie(&mut self) -> WKUIE_W { | ||
| 1156 | WKUIE_W { w: self } | ||
| 1157 | } | ||
| 1158 | #[doc = "Bit 15 - ERRIE"] | ||
| 1159 | #[inline(always)] | ||
| 1160 | pub fn errie(&mut self) -> ERRIE_W { | ||
| 1161 | ERRIE_W { w: self } | ||
| 1162 | } | ||
| 1163 | #[doc = "Bit 11 - LECIE"] | ||
| 1164 | #[inline(always)] | ||
| 1165 | pub fn lecie(&mut self) -> LECIE_W { | ||
| 1166 | LECIE_W { w: self } | ||
| 1167 | } | ||
| 1168 | #[doc = "Bit 10 - BOFIE"] | ||
| 1169 | #[inline(always)] | ||
| 1170 | pub fn bofie(&mut self) -> BOFIE_W { | ||
| 1171 | BOFIE_W { w: self } | ||
| 1172 | } | ||
| 1173 | #[doc = "Bit 9 - EPVIE"] | ||
| 1174 | #[inline(always)] | ||
| 1175 | pub fn epvie(&mut self) -> EPVIE_W { | ||
| 1176 | EPVIE_W { w: self } | ||
| 1177 | } | ||
| 1178 | #[doc = "Bit 8 - EWGIE"] | ||
| 1179 | #[inline(always)] | ||
| 1180 | pub fn ewgie(&mut self) -> EWGIE_W { | ||
| 1181 | EWGIE_W { w: self } | ||
| 1182 | } | ||
| 1183 | #[doc = "Bit 6 - FOVIE1"] | ||
| 1184 | #[inline(always)] | ||
| 1185 | pub fn fovie1(&mut self) -> FOVIE1_W { | ||
| 1186 | FOVIE1_W { w: self } | ||
| 1187 | } | ||
| 1188 | #[doc = "Bit 5 - FFIE1"] | ||
| 1189 | #[inline(always)] | ||
| 1190 | pub fn ffie1(&mut self) -> FFIE1_W { | ||
| 1191 | FFIE1_W { w: self } | ||
| 1192 | } | ||
| 1193 | #[doc = "Bit 4 - FMPIE1"] | ||
| 1194 | #[inline(always)] | ||
| 1195 | pub fn fmpie1(&mut self) -> FMPIE1_W { | ||
| 1196 | FMPIE1_W { w: self } | ||
| 1197 | } | ||
| 1198 | #[doc = "Bit 3 - FOVIE0"] | ||
| 1199 | #[inline(always)] | ||
| 1200 | pub fn fovie0(&mut self) -> FOVIE0_W { | ||
| 1201 | FOVIE0_W { w: self } | ||
| 1202 | } | ||
| 1203 | #[doc = "Bit 2 - FFIE0"] | ||
| 1204 | #[inline(always)] | ||
| 1205 | pub fn ffie0(&mut self) -> FFIE0_W { | ||
| 1206 | FFIE0_W { w: self } | ||
| 1207 | } | ||
| 1208 | #[doc = "Bit 1 - FMPIE0"] | ||
| 1209 | #[inline(always)] | ||
| 1210 | pub fn fmpie0(&mut self) -> FMPIE0_W { | ||
| 1211 | FMPIE0_W { w: self } | ||
| 1212 | } | ||
| 1213 | #[doc = "Bit 0 - TMEIE"] | ||
| 1214 | #[inline(always)] | ||
| 1215 | pub fn tmeie(&mut self) -> TMEIE_W { | ||
| 1216 | TMEIE_W { w: self } | ||
| 1217 | } | ||
| 1218 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/mcr.rs b/embassy-stm32/src/can/bx/pac/can/mcr.rs deleted file mode 100644 index bce9561d9..000000000 --- a/embassy-stm32/src/can/bx/pac/can/mcr.rs +++ /dev/null | |||
| @@ -1,356 +0,0 @@ | |||
| 1 | #[doc = "Reader of register MCR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::MCR>; | ||
| 3 | #[doc = "Writer for register MCR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::MCR>; | ||
| 5 | #[doc = "Register MCR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::MCR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `DBF`"] | ||
| 14 | pub type DBF_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Write proxy for field `DBF`"] | ||
| 16 | pub struct DBF_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> DBF_W<'a> { | ||
| 20 | #[doc = r"Sets the field bit"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn set_bit(self) -> &'a mut W { | ||
| 23 | self.bit(true) | ||
| 24 | } | ||
| 25 | #[doc = r"Clears the field bit"] | ||
| 26 | #[inline(always)] | ||
| 27 | pub fn clear_bit(self) -> &'a mut W { | ||
| 28 | self.bit(false) | ||
| 29 | } | ||
| 30 | #[doc = r"Writes raw bits to the field"] | ||
| 31 | #[inline(always)] | ||
| 32 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 33 | self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); | ||
| 34 | self.w | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Reader of field `RESET`"] | ||
| 38 | pub type RESET_R = crate::can::bx::R<bool, bool>; | ||
| 39 | #[doc = "Write proxy for field `RESET`"] | ||
| 40 | pub struct RESET_W<'a> { | ||
| 41 | w: &'a mut W, | ||
| 42 | } | ||
| 43 | impl<'a> RESET_W<'a> { | ||
| 44 | #[doc = r"Sets the field bit"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn set_bit(self) -> &'a mut W { | ||
| 47 | self.bit(true) | ||
| 48 | } | ||
| 49 | #[doc = r"Clears the field bit"] | ||
| 50 | #[inline(always)] | ||
| 51 | pub fn clear_bit(self) -> &'a mut W { | ||
| 52 | self.bit(false) | ||
| 53 | } | ||
| 54 | #[doc = r"Writes raw bits to the field"] | ||
| 55 | #[inline(always)] | ||
| 56 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 57 | self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); | ||
| 58 | self.w | ||
| 59 | } | ||
| 60 | } | ||
| 61 | #[doc = "Reader of field `TTCM`"] | ||
| 62 | pub type TTCM_R = crate::can::bx::R<bool, bool>; | ||
| 63 | #[doc = "Write proxy for field `TTCM`"] | ||
| 64 | pub struct TTCM_W<'a> { | ||
| 65 | w: &'a mut W, | ||
| 66 | } | ||
| 67 | impl<'a> TTCM_W<'a> { | ||
| 68 | #[doc = r"Sets the field bit"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn set_bit(self) -> &'a mut W { | ||
| 71 | self.bit(true) | ||
| 72 | } | ||
| 73 | #[doc = r"Clears the field bit"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn clear_bit(self) -> &'a mut W { | ||
| 76 | self.bit(false) | ||
| 77 | } | ||
| 78 | #[doc = r"Writes raw bits to the field"] | ||
| 79 | #[inline(always)] | ||
| 80 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 81 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 82 | self.w | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #[doc = "Reader of field `ABOM`"] | ||
| 86 | pub type ABOM_R = crate::can::bx::R<bool, bool>; | ||
| 87 | #[doc = "Write proxy for field `ABOM`"] | ||
| 88 | pub struct ABOM_W<'a> { | ||
| 89 | w: &'a mut W, | ||
| 90 | } | ||
| 91 | impl<'a> ABOM_W<'a> { | ||
| 92 | #[doc = r"Sets the field bit"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn set_bit(self) -> &'a mut W { | ||
| 95 | self.bit(true) | ||
| 96 | } | ||
| 97 | #[doc = r"Clears the field bit"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn clear_bit(self) -> &'a mut W { | ||
| 100 | self.bit(false) | ||
| 101 | } | ||
| 102 | #[doc = r"Writes raw bits to the field"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 105 | self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); | ||
| 106 | self.w | ||
| 107 | } | ||
| 108 | } | ||
| 109 | #[doc = "Reader of field `AWUM`"] | ||
| 110 | pub type AWUM_R = crate::can::bx::R<bool, bool>; | ||
| 111 | #[doc = "Write proxy for field `AWUM`"] | ||
| 112 | pub struct AWUM_W<'a> { | ||
| 113 | w: &'a mut W, | ||
| 114 | } | ||
| 115 | impl<'a> AWUM_W<'a> { | ||
| 116 | #[doc = r"Sets the field bit"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn set_bit(self) -> &'a mut W { | ||
| 119 | self.bit(true) | ||
| 120 | } | ||
| 121 | #[doc = r"Clears the field bit"] | ||
| 122 | #[inline(always)] | ||
| 123 | pub fn clear_bit(self) -> &'a mut W { | ||
| 124 | self.bit(false) | ||
| 125 | } | ||
| 126 | #[doc = r"Writes raw bits to the field"] | ||
| 127 | #[inline(always)] | ||
| 128 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 129 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 130 | self.w | ||
| 131 | } | ||
| 132 | } | ||
| 133 | #[doc = "Reader of field `NART`"] | ||
| 134 | pub type NART_R = crate::can::bx::R<bool, bool>; | ||
| 135 | #[doc = "Write proxy for field `NART`"] | ||
| 136 | pub struct NART_W<'a> { | ||
| 137 | w: &'a mut W, | ||
| 138 | } | ||
| 139 | impl<'a> NART_W<'a> { | ||
| 140 | #[doc = r"Sets the field bit"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn set_bit(self) -> &'a mut W { | ||
| 143 | self.bit(true) | ||
| 144 | } | ||
| 145 | #[doc = r"Clears the field bit"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn clear_bit(self) -> &'a mut W { | ||
| 148 | self.bit(false) | ||
| 149 | } | ||
| 150 | #[doc = r"Writes raw bits to the field"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 153 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 154 | self.w | ||
| 155 | } | ||
| 156 | } | ||
| 157 | #[doc = "Reader of field `RFLM`"] | ||
| 158 | pub type RFLM_R = crate::can::bx::R<bool, bool>; | ||
| 159 | #[doc = "Write proxy for field `RFLM`"] | ||
| 160 | pub struct RFLM_W<'a> { | ||
| 161 | w: &'a mut W, | ||
| 162 | } | ||
| 163 | impl<'a> RFLM_W<'a> { | ||
| 164 | #[doc = r"Sets the field bit"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn set_bit(self) -> &'a mut W { | ||
| 167 | self.bit(true) | ||
| 168 | } | ||
| 169 | #[doc = r"Clears the field bit"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn clear_bit(self) -> &'a mut W { | ||
| 172 | self.bit(false) | ||
| 173 | } | ||
| 174 | #[doc = r"Writes raw bits to the field"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 177 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 178 | self.w | ||
| 179 | } | ||
| 180 | } | ||
| 181 | #[doc = "Reader of field `TXFP`"] | ||
| 182 | pub type TXFP_R = crate::can::bx::R<bool, bool>; | ||
| 183 | #[doc = "Write proxy for field `TXFP`"] | ||
| 184 | pub struct TXFP_W<'a> { | ||
| 185 | w: &'a mut W, | ||
| 186 | } | ||
| 187 | impl<'a> TXFP_W<'a> { | ||
| 188 | #[doc = r"Sets the field bit"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn set_bit(self) -> &'a mut W { | ||
| 191 | self.bit(true) | ||
| 192 | } | ||
| 193 | #[doc = r"Clears the field bit"] | ||
| 194 | #[inline(always)] | ||
| 195 | pub fn clear_bit(self) -> &'a mut W { | ||
| 196 | self.bit(false) | ||
| 197 | } | ||
| 198 | #[doc = r"Writes raw bits to the field"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 201 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 202 | self.w | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "Reader of field `SLEEP`"] | ||
| 206 | pub type SLEEP_R = crate::can::bx::R<bool, bool>; | ||
| 207 | #[doc = "Write proxy for field `SLEEP`"] | ||
| 208 | pub struct SLEEP_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> SLEEP_W<'a> { | ||
| 212 | #[doc = r"Sets the field bit"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn set_bit(self) -> &'a mut W { | ||
| 215 | self.bit(true) | ||
| 216 | } | ||
| 217 | #[doc = r"Clears the field bit"] | ||
| 218 | #[inline(always)] | ||
| 219 | pub fn clear_bit(self) -> &'a mut W { | ||
| 220 | self.bit(false) | ||
| 221 | } | ||
| 222 | #[doc = r"Writes raw bits to the field"] | ||
| 223 | #[inline(always)] | ||
| 224 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 225 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 226 | self.w | ||
| 227 | } | ||
| 228 | } | ||
| 229 | #[doc = "Reader of field `INRQ`"] | ||
| 230 | pub type INRQ_R = crate::can::bx::R<bool, bool>; | ||
| 231 | #[doc = "Write proxy for field `INRQ`"] | ||
| 232 | pub struct INRQ_W<'a> { | ||
| 233 | w: &'a mut W, | ||
| 234 | } | ||
| 235 | impl<'a> INRQ_W<'a> { | ||
| 236 | #[doc = r"Sets the field bit"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn set_bit(self) -> &'a mut W { | ||
| 239 | self.bit(true) | ||
| 240 | } | ||
| 241 | #[doc = r"Clears the field bit"] | ||
| 242 | #[inline(always)] | ||
| 243 | pub fn clear_bit(self) -> &'a mut W { | ||
| 244 | self.bit(false) | ||
| 245 | } | ||
| 246 | #[doc = r"Writes raw bits to the field"] | ||
| 247 | #[inline(always)] | ||
| 248 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 249 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 250 | self.w | ||
| 251 | } | ||
| 252 | } | ||
| 253 | impl R { | ||
| 254 | #[doc = "Bit 16 - DBF"] | ||
| 255 | #[inline(always)] | ||
| 256 | pub fn dbf(&self) -> DBF_R { | ||
| 257 | DBF_R::new(((self.bits >> 16) & 0x01) != 0) | ||
| 258 | } | ||
| 259 | #[doc = "Bit 15 - RESET"] | ||
| 260 | #[inline(always)] | ||
| 261 | pub fn reset(&self) -> RESET_R { | ||
| 262 | RESET_R::new(((self.bits >> 15) & 0x01) != 0) | ||
| 263 | } | ||
| 264 | #[doc = "Bit 7 - TTCM"] | ||
| 265 | #[inline(always)] | ||
| 266 | pub fn ttcm(&self) -> TTCM_R { | ||
| 267 | TTCM_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 268 | } | ||
| 269 | #[doc = "Bit 6 - ABOM"] | ||
| 270 | #[inline(always)] | ||
| 271 | pub fn abom(&self) -> ABOM_R { | ||
| 272 | ABOM_R::new(((self.bits >> 6) & 0x01) != 0) | ||
| 273 | } | ||
| 274 | #[doc = "Bit 5 - AWUM"] | ||
| 275 | #[inline(always)] | ||
| 276 | pub fn awum(&self) -> AWUM_R { | ||
| 277 | AWUM_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 278 | } | ||
| 279 | #[doc = "Bit 4 - NART"] | ||
| 280 | #[inline(always)] | ||
| 281 | pub fn nart(&self) -> NART_R { | ||
| 282 | NART_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 283 | } | ||
| 284 | #[doc = "Bit 3 - RFLM"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn rflm(&self) -> RFLM_R { | ||
| 287 | RFLM_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 288 | } | ||
| 289 | #[doc = "Bit 2 - TXFP"] | ||
| 290 | #[inline(always)] | ||
| 291 | pub fn txfp(&self) -> TXFP_R { | ||
| 292 | TXFP_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 293 | } | ||
| 294 | #[doc = "Bit 1 - SLEEP"] | ||
| 295 | #[inline(always)] | ||
| 296 | pub fn sleep(&self) -> SLEEP_R { | ||
| 297 | SLEEP_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 298 | } | ||
| 299 | #[doc = "Bit 0 - INRQ"] | ||
| 300 | #[inline(always)] | ||
| 301 | pub fn inrq(&self) -> INRQ_R { | ||
| 302 | INRQ_R::new((self.bits & 0x01) != 0) | ||
| 303 | } | ||
| 304 | } | ||
| 305 | impl W { | ||
| 306 | #[doc = "Bit 16 - DBF"] | ||
| 307 | #[inline(always)] | ||
| 308 | pub fn dbf(&mut self) -> DBF_W { | ||
| 309 | DBF_W { w: self } | ||
| 310 | } | ||
| 311 | #[doc = "Bit 15 - RESET"] | ||
| 312 | #[inline(always)] | ||
| 313 | pub fn reset(&mut self) -> RESET_W { | ||
| 314 | RESET_W { w: self } | ||
| 315 | } | ||
| 316 | #[doc = "Bit 7 - TTCM"] | ||
| 317 | #[inline(always)] | ||
| 318 | pub fn ttcm(&mut self) -> TTCM_W { | ||
| 319 | TTCM_W { w: self } | ||
| 320 | } | ||
| 321 | #[doc = "Bit 6 - ABOM"] | ||
| 322 | #[inline(always)] | ||
| 323 | pub fn abom(&mut self) -> ABOM_W { | ||
| 324 | ABOM_W { w: self } | ||
| 325 | } | ||
| 326 | #[doc = "Bit 5 - AWUM"] | ||
| 327 | #[inline(always)] | ||
| 328 | pub fn awum(&mut self) -> AWUM_W { | ||
| 329 | AWUM_W { w: self } | ||
| 330 | } | ||
| 331 | #[doc = "Bit 4 - NART"] | ||
| 332 | #[inline(always)] | ||
| 333 | pub fn nart(&mut self) -> NART_W { | ||
| 334 | NART_W { w: self } | ||
| 335 | } | ||
| 336 | #[doc = "Bit 3 - RFLM"] | ||
| 337 | #[inline(always)] | ||
| 338 | pub fn rflm(&mut self) -> RFLM_W { | ||
| 339 | RFLM_W { w: self } | ||
| 340 | } | ||
| 341 | #[doc = "Bit 2 - TXFP"] | ||
| 342 | #[inline(always)] | ||
| 343 | pub fn txfp(&mut self) -> TXFP_W { | ||
| 344 | TXFP_W { w: self } | ||
| 345 | } | ||
| 346 | #[doc = "Bit 1 - SLEEP"] | ||
| 347 | #[inline(always)] | ||
| 348 | pub fn sleep(&mut self) -> SLEEP_W { | ||
| 349 | SLEEP_W { w: self } | ||
| 350 | } | ||
| 351 | #[doc = "Bit 0 - INRQ"] | ||
| 352 | #[inline(always)] | ||
| 353 | pub fn inrq(&mut self) -> INRQ_W { | ||
| 354 | INRQ_W { w: self } | ||
| 355 | } | ||
| 356 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/msr.rs b/embassy-stm32/src/can/bx/pac/can/msr.rs deleted file mode 100644 index 2e076b14e..000000000 --- a/embassy-stm32/src/can/bx/pac/can/msr.rs +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | #[doc = "Reader of register MSR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::MSR>; | ||
| 3 | #[doc = "Writer for register MSR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::MSR>; | ||
| 5 | #[doc = "Register MSR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::MSR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `RX`"] | ||
| 14 | pub type RX_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Reader of field `SAMP`"] | ||
| 16 | pub type SAMP_R = crate::can::bx::R<bool, bool>; | ||
| 17 | #[doc = "Reader of field `RXM`"] | ||
| 18 | pub type RXM_R = crate::can::bx::R<bool, bool>; | ||
| 19 | #[doc = "Reader of field `TXM`"] | ||
| 20 | pub type TXM_R = crate::can::bx::R<bool, bool>; | ||
| 21 | #[doc = "Reader of field `SLAKI`"] | ||
| 22 | pub type SLAKI_R = crate::can::bx::R<bool, bool>; | ||
| 23 | #[doc = "Write proxy for field `SLAKI`"] | ||
| 24 | pub struct SLAKI_W<'a> { | ||
| 25 | w: &'a mut W, | ||
| 26 | } | ||
| 27 | impl<'a> SLAKI_W<'a> { | ||
| 28 | #[doc = r"Sets the field bit"] | ||
| 29 | #[inline(always)] | ||
| 30 | pub fn set_bit(self) -> &'a mut W { | ||
| 31 | self.bit(true) | ||
| 32 | } | ||
| 33 | #[doc = r"Clears the field bit"] | ||
| 34 | #[inline(always)] | ||
| 35 | pub fn clear_bit(self) -> &'a mut W { | ||
| 36 | self.bit(false) | ||
| 37 | } | ||
| 38 | #[doc = r"Writes raw bits to the field"] | ||
| 39 | #[inline(always)] | ||
| 40 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 41 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 42 | self.w | ||
| 43 | } | ||
| 44 | } | ||
| 45 | #[doc = "Reader of field `WKUI`"] | ||
| 46 | pub type WKUI_R = crate::can::bx::R<bool, bool>; | ||
| 47 | #[doc = "Write proxy for field `WKUI`"] | ||
| 48 | pub struct WKUI_W<'a> { | ||
| 49 | w: &'a mut W, | ||
| 50 | } | ||
| 51 | impl<'a> WKUI_W<'a> { | ||
| 52 | #[doc = r"Sets the field bit"] | ||
| 53 | #[inline(always)] | ||
| 54 | pub fn set_bit(self) -> &'a mut W { | ||
| 55 | self.bit(true) | ||
| 56 | } | ||
| 57 | #[doc = r"Clears the field bit"] | ||
| 58 | #[inline(always)] | ||
| 59 | pub fn clear_bit(self) -> &'a mut W { | ||
| 60 | self.bit(false) | ||
| 61 | } | ||
| 62 | #[doc = r"Writes raw bits to the field"] | ||
| 63 | #[inline(always)] | ||
| 64 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 65 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 66 | self.w | ||
| 67 | } | ||
| 68 | } | ||
| 69 | #[doc = "Reader of field `ERRI`"] | ||
| 70 | pub type ERRI_R = crate::can::bx::R<bool, bool>; | ||
| 71 | #[doc = "Write proxy for field `ERRI`"] | ||
| 72 | pub struct ERRI_W<'a> { | ||
| 73 | w: &'a mut W, | ||
| 74 | } | ||
| 75 | impl<'a> ERRI_W<'a> { | ||
| 76 | #[doc = r"Sets the field bit"] | ||
| 77 | #[inline(always)] | ||
| 78 | pub fn set_bit(self) -> &'a mut W { | ||
| 79 | self.bit(true) | ||
| 80 | } | ||
| 81 | #[doc = r"Clears the field bit"] | ||
| 82 | #[inline(always)] | ||
| 83 | pub fn clear_bit(self) -> &'a mut W { | ||
| 84 | self.bit(false) | ||
| 85 | } | ||
| 86 | #[doc = r"Writes raw bits to the field"] | ||
| 87 | #[inline(always)] | ||
| 88 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 89 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 90 | self.w | ||
| 91 | } | ||
| 92 | } | ||
| 93 | #[doc = "Reader of field `SLAK`"] | ||
| 94 | pub type SLAK_R = crate::can::bx::R<bool, bool>; | ||
| 95 | #[doc = "Reader of field `INAK`"] | ||
| 96 | pub type INAK_R = crate::can::bx::R<bool, bool>; | ||
| 97 | impl R { | ||
| 98 | #[doc = "Bit 11 - RX"] | ||
| 99 | #[inline(always)] | ||
| 100 | pub fn rx(&self) -> RX_R { | ||
| 101 | RX_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 102 | } | ||
| 103 | #[doc = "Bit 10 - SAMP"] | ||
| 104 | #[inline(always)] | ||
| 105 | pub fn samp(&self) -> SAMP_R { | ||
| 106 | SAMP_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 107 | } | ||
| 108 | #[doc = "Bit 9 - RXM"] | ||
| 109 | #[inline(always)] | ||
| 110 | pub fn rxm(&self) -> RXM_R { | ||
| 111 | RXM_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 112 | } | ||
| 113 | #[doc = "Bit 8 - TXM"] | ||
| 114 | #[inline(always)] | ||
| 115 | pub fn txm(&self) -> TXM_R { | ||
| 116 | TXM_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 117 | } | ||
| 118 | #[doc = "Bit 4 - SLAKI"] | ||
| 119 | #[inline(always)] | ||
| 120 | pub fn slaki(&self) -> SLAKI_R { | ||
| 121 | SLAKI_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 122 | } | ||
| 123 | #[doc = "Bit 3 - WKUI"] | ||
| 124 | #[inline(always)] | ||
| 125 | pub fn wkui(&self) -> WKUI_R { | ||
| 126 | WKUI_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 127 | } | ||
| 128 | #[doc = "Bit 2 - ERRI"] | ||
| 129 | #[inline(always)] | ||
| 130 | pub fn erri(&self) -> ERRI_R { | ||
| 131 | ERRI_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 132 | } | ||
| 133 | #[doc = "Bit 1 - SLAK"] | ||
| 134 | #[inline(always)] | ||
| 135 | pub fn slak(&self) -> SLAK_R { | ||
| 136 | SLAK_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 137 | } | ||
| 138 | #[doc = "Bit 0 - INAK"] | ||
| 139 | #[inline(always)] | ||
| 140 | pub fn inak(&self) -> INAK_R { | ||
| 141 | INAK_R::new((self.bits & 0x01) != 0) | ||
| 142 | } | ||
| 143 | } | ||
| 144 | impl W { | ||
| 145 | #[doc = "Bit 4 - SLAKI"] | ||
| 146 | #[inline(always)] | ||
| 147 | pub fn slaki(&mut self) -> SLAKI_W { | ||
| 148 | SLAKI_W { w: self } | ||
| 149 | } | ||
| 150 | #[doc = "Bit 3 - WKUI"] | ||
| 151 | #[inline(always)] | ||
| 152 | pub fn wkui(&mut self) -> WKUI_W { | ||
| 153 | WKUI_W { w: self } | ||
| 154 | } | ||
| 155 | #[doc = "Bit 2 - ERRI"] | ||
| 156 | #[inline(always)] | ||
| 157 | pub fn erri(&mut self) -> ERRI_W { | ||
| 158 | ERRI_W { w: self } | ||
| 159 | } | ||
| 160 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rfr.rs b/embassy-stm32/src/can/bx/pac/can/rfr.rs deleted file mode 100644 index 1a4047cb4..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rfr.rs +++ /dev/null | |||
| @@ -1,281 +0,0 @@ | |||
| 1 | #[doc = "Reader of register RF%sR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::RFR>; | ||
| 3 | #[doc = "Writer for register RF%sR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::RFR>; | ||
| 5 | #[doc = "Register RF%sR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::RFR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "RFOM0\n\nValue on reset: 0"] | ||
| 14 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 15 | pub enum RFOM_A { | ||
| 16 | #[doc = "1: Set by software to release the output mailbox of the FIFO"] | ||
| 17 | RELEASE = 1, | ||
| 18 | } | ||
| 19 | impl From<RFOM_A> for bool { | ||
| 20 | #[inline(always)] | ||
| 21 | fn from(variant: RFOM_A) -> Self { | ||
| 22 | variant as u8 != 0 | ||
| 23 | } | ||
| 24 | } | ||
| 25 | #[doc = "Reader of field `RFOM`"] | ||
| 26 | pub type RFOM_R = crate::can::bx::R<bool, RFOM_A>; | ||
| 27 | impl RFOM_R { | ||
| 28 | #[doc = r"Get enumerated values variant"] | ||
| 29 | #[inline(always)] | ||
| 30 | pub fn variant(&self) -> crate::can::bx::Variant<bool, RFOM_A> { | ||
| 31 | use crate::can::bx::Variant::*; | ||
| 32 | match self.bits { | ||
| 33 | true => Val(RFOM_A::RELEASE), | ||
| 34 | i => Res(i), | ||
| 35 | } | ||
| 36 | } | ||
| 37 | #[doc = "Checks if the value of the field is `RELEASE`"] | ||
| 38 | #[inline(always)] | ||
| 39 | pub fn is_release(&self) -> bool { | ||
| 40 | *self == RFOM_A::RELEASE | ||
| 41 | } | ||
| 42 | } | ||
| 43 | #[doc = "Write proxy for field `RFOM`"] | ||
| 44 | pub struct RFOM_W<'a> { | ||
| 45 | w: &'a mut W, | ||
| 46 | } | ||
| 47 | impl<'a> RFOM_W<'a> { | ||
| 48 | #[doc = r"Writes `variant` to the field"] | ||
| 49 | #[inline(always)] | ||
| 50 | pub fn variant(self, variant: RFOM_A) -> &'a mut W { | ||
| 51 | { | ||
| 52 | self.bit(variant.into()) | ||
| 53 | } | ||
| 54 | } | ||
| 55 | #[doc = "Set by software to release the output mailbox of the FIFO"] | ||
| 56 | #[inline(always)] | ||
| 57 | pub fn release(self) -> &'a mut W { | ||
| 58 | self.variant(RFOM_A::RELEASE) | ||
| 59 | } | ||
| 60 | #[doc = r"Sets the field bit"] | ||
| 61 | #[inline(always)] | ||
| 62 | pub fn set_bit(self) -> &'a mut W { | ||
| 63 | self.bit(true) | ||
| 64 | } | ||
| 65 | #[doc = r"Clears the field bit"] | ||
| 66 | #[inline(always)] | ||
| 67 | pub fn clear_bit(self) -> &'a mut W { | ||
| 68 | self.bit(false) | ||
| 69 | } | ||
| 70 | #[doc = r"Writes raw bits to the field"] | ||
| 71 | #[inline(always)] | ||
| 72 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 73 | self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); | ||
| 74 | self.w | ||
| 75 | } | ||
| 76 | } | ||
| 77 | #[doc = "FOVR0\n\nValue on reset: 0"] | ||
| 78 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 79 | pub enum FOVR_A { | ||
| 80 | #[doc = "0: No FIFO x overrun"] | ||
| 81 | NOOVERRUN = 0, | ||
| 82 | #[doc = "1: FIFO x overrun"] | ||
| 83 | OVERRUN = 1, | ||
| 84 | } | ||
| 85 | impl From<FOVR_A> for bool { | ||
| 86 | #[inline(always)] | ||
| 87 | fn from(variant: FOVR_A) -> Self { | ||
| 88 | variant as u8 != 0 | ||
| 89 | } | ||
| 90 | } | ||
| 91 | #[doc = "Reader of field `FOVR`"] | ||
| 92 | pub type FOVR_R = crate::can::bx::R<bool, FOVR_A>; | ||
| 93 | impl FOVR_R { | ||
| 94 | #[doc = r"Get enumerated values variant"] | ||
| 95 | #[inline(always)] | ||
| 96 | pub fn variant(&self) -> FOVR_A { | ||
| 97 | match self.bits { | ||
| 98 | false => FOVR_A::NOOVERRUN, | ||
| 99 | true => FOVR_A::OVERRUN, | ||
| 100 | } | ||
| 101 | } | ||
| 102 | #[doc = "Checks if the value of the field is `NOOVERRUN`"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn is_no_overrun(&self) -> bool { | ||
| 105 | *self == FOVR_A::NOOVERRUN | ||
| 106 | } | ||
| 107 | #[doc = "Checks if the value of the field is `OVERRUN`"] | ||
| 108 | #[inline(always)] | ||
| 109 | pub fn is_overrun(&self) -> bool { | ||
| 110 | *self == FOVR_A::OVERRUN | ||
| 111 | } | ||
| 112 | } | ||
| 113 | #[doc = "FOVR0\n\nValue on reset: 0"] | ||
| 114 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 115 | pub enum FOVR_AW { | ||
| 116 | #[doc = "1: Clear flag"] | ||
| 117 | CLEAR = 1, | ||
| 118 | } | ||
| 119 | impl From<FOVR_AW> for bool { | ||
| 120 | #[inline(always)] | ||
| 121 | fn from(variant: FOVR_AW) -> Self { | ||
| 122 | variant as u8 != 0 | ||
| 123 | } | ||
| 124 | } | ||
| 125 | #[doc = "Write proxy for field `FOVR`"] | ||
| 126 | pub struct FOVR_W<'a> { | ||
| 127 | w: &'a mut W, | ||
| 128 | } | ||
| 129 | impl<'a> FOVR_W<'a> { | ||
| 130 | #[doc = r"Writes `variant` to the field"] | ||
| 131 | #[inline(always)] | ||
| 132 | pub fn variant(self, variant: FOVR_AW) -> &'a mut W { | ||
| 133 | { | ||
| 134 | self.bit(variant.into()) | ||
| 135 | } | ||
| 136 | } | ||
| 137 | #[doc = "Clear flag"] | ||
| 138 | #[inline(always)] | ||
| 139 | pub fn clear(self) -> &'a mut W { | ||
| 140 | self.variant(FOVR_AW::CLEAR) | ||
| 141 | } | ||
| 142 | #[doc = r"Sets the field bit"] | ||
| 143 | #[inline(always)] | ||
| 144 | pub fn set_bit(self) -> &'a mut W { | ||
| 145 | self.bit(true) | ||
| 146 | } | ||
| 147 | #[doc = r"Clears the field bit"] | ||
| 148 | #[inline(always)] | ||
| 149 | pub fn clear_bit(self) -> &'a mut W { | ||
| 150 | self.bit(false) | ||
| 151 | } | ||
| 152 | #[doc = r"Writes raw bits to the field"] | ||
| 153 | #[inline(always)] | ||
| 154 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 155 | self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); | ||
| 156 | self.w | ||
| 157 | } | ||
| 158 | } | ||
| 159 | #[doc = "FULL0\n\nValue on reset: 0"] | ||
| 160 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 161 | pub enum FULL_A { | ||
| 162 | #[doc = "0: FIFO x is not full"] | ||
| 163 | NOTFULL = 0, | ||
| 164 | #[doc = "1: FIFO x is full"] | ||
| 165 | FULL = 1, | ||
| 166 | } | ||
| 167 | impl From<FULL_A> for bool { | ||
| 168 | #[inline(always)] | ||
| 169 | fn from(variant: FULL_A) -> Self { | ||
| 170 | variant as u8 != 0 | ||
| 171 | } | ||
| 172 | } | ||
| 173 | #[doc = "Reader of field `FULL`"] | ||
| 174 | pub type FULL_R = crate::can::bx::R<bool, FULL_A>; | ||
| 175 | impl FULL_R { | ||
| 176 | #[doc = r"Get enumerated values variant"] | ||
| 177 | #[inline(always)] | ||
| 178 | pub fn variant(&self) -> FULL_A { | ||
| 179 | match self.bits { | ||
| 180 | false => FULL_A::NOTFULL, | ||
| 181 | true => FULL_A::FULL, | ||
| 182 | } | ||
| 183 | } | ||
| 184 | #[doc = "Checks if the value of the field is `NOTFULL`"] | ||
| 185 | #[inline(always)] | ||
| 186 | pub fn is_not_full(&self) -> bool { | ||
| 187 | *self == FULL_A::NOTFULL | ||
| 188 | } | ||
| 189 | #[doc = "Checks if the value of the field is `FULL`"] | ||
| 190 | #[inline(always)] | ||
| 191 | pub fn is_full(&self) -> bool { | ||
| 192 | *self == FULL_A::FULL | ||
| 193 | } | ||
| 194 | } | ||
| 195 | #[doc = "FULL0\n\nValue on reset: 0"] | ||
| 196 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 197 | pub enum FULL_AW { | ||
| 198 | #[doc = "1: Clear flag"] | ||
| 199 | CLEAR = 1, | ||
| 200 | } | ||
| 201 | impl From<FULL_AW> for bool { | ||
| 202 | #[inline(always)] | ||
| 203 | fn from(variant: FULL_AW) -> Self { | ||
| 204 | variant as u8 != 0 | ||
| 205 | } | ||
| 206 | } | ||
| 207 | #[doc = "Write proxy for field `FULL`"] | ||
| 208 | pub struct FULL_W<'a> { | ||
| 209 | w: &'a mut W, | ||
| 210 | } | ||
| 211 | impl<'a> FULL_W<'a> { | ||
| 212 | #[doc = r"Writes `variant` to the field"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn variant(self, variant: FULL_AW) -> &'a mut W { | ||
| 215 | { | ||
| 216 | self.bit(variant.into()) | ||
| 217 | } | ||
| 218 | } | ||
| 219 | #[doc = "Clear flag"] | ||
| 220 | #[inline(always)] | ||
| 221 | pub fn clear(self) -> &'a mut W { | ||
| 222 | self.variant(FULL_AW::CLEAR) | ||
| 223 | } | ||
| 224 | #[doc = r"Sets the field bit"] | ||
| 225 | #[inline(always)] | ||
| 226 | pub fn set_bit(self) -> &'a mut W { | ||
| 227 | self.bit(true) | ||
| 228 | } | ||
| 229 | #[doc = r"Clears the field bit"] | ||
| 230 | #[inline(always)] | ||
| 231 | pub fn clear_bit(self) -> &'a mut W { | ||
| 232 | self.bit(false) | ||
| 233 | } | ||
| 234 | #[doc = r"Writes raw bits to the field"] | ||
| 235 | #[inline(always)] | ||
| 236 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 237 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 238 | self.w | ||
| 239 | } | ||
| 240 | } | ||
| 241 | #[doc = "Reader of field `FMP`"] | ||
| 242 | pub type FMP_R = crate::can::bx::R<u8, u8>; | ||
| 243 | impl R { | ||
| 244 | #[doc = "Bit 5 - RFOM0"] | ||
| 245 | #[inline(always)] | ||
| 246 | pub fn rfom(&self) -> RFOM_R { | ||
| 247 | RFOM_R::new(((self.bits >> 5) & 0x01) != 0) | ||
| 248 | } | ||
| 249 | #[doc = "Bit 4 - FOVR0"] | ||
| 250 | #[inline(always)] | ||
| 251 | pub fn fovr(&self) -> FOVR_R { | ||
| 252 | FOVR_R::new(((self.bits >> 4) & 0x01) != 0) | ||
| 253 | } | ||
| 254 | #[doc = "Bit 3 - FULL0"] | ||
| 255 | #[inline(always)] | ||
| 256 | pub fn full(&self) -> FULL_R { | ||
| 257 | FULL_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 258 | } | ||
| 259 | #[doc = "Bits 0:1 - FMP0"] | ||
| 260 | #[inline(always)] | ||
| 261 | pub fn fmp(&self) -> FMP_R { | ||
| 262 | FMP_R::new((self.bits & 0x03) as u8) | ||
| 263 | } | ||
| 264 | } | ||
| 265 | impl W { | ||
| 266 | #[doc = "Bit 5 - RFOM0"] | ||
| 267 | #[inline(always)] | ||
| 268 | pub fn rfom(&mut self) -> RFOM_W { | ||
| 269 | RFOM_W { w: self } | ||
| 270 | } | ||
| 271 | #[doc = "Bit 4 - FOVR0"] | ||
| 272 | #[inline(always)] | ||
| 273 | pub fn fovr(&mut self) -> FOVR_W { | ||
| 274 | FOVR_W { w: self } | ||
| 275 | } | ||
| 276 | #[doc = "Bit 3 - FULL0"] | ||
| 277 | #[inline(always)] | ||
| 278 | pub fn full(&mut self) -> FULL_W { | ||
| 279 | FULL_W { w: self } | ||
| 280 | } | ||
| 281 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rx.rs b/embassy-stm32/src/can/bx/pac/can/rx.rs deleted file mode 100644 index 58ce7be4a..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rx.rs +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | #[doc = "CAN_RI0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rir](rir) module"] | ||
| 2 | pub type RIR = crate::can::bx::Reg<u32, _RIR>; | ||
| 3 | #[allow(missing_docs)] | ||
| 4 | #[doc(hidden)] | ||
| 5 | pub struct _RIR; | ||
| 6 | #[doc = "`read()` method returns [rir::R](rir::R) reader structure"] | ||
| 7 | impl crate::can::bx::Readable for RIR {} | ||
| 8 | #[doc = "CAN_RI0R"] | ||
| 9 | pub mod rir; | ||
| 10 | #[doc = "CAN_RDT0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdtr](rdtr) module"] | ||
| 11 | pub type RDTR = crate::can::bx::Reg<u32, _RDTR>; | ||
| 12 | #[allow(missing_docs)] | ||
| 13 | #[doc(hidden)] | ||
| 14 | pub struct _RDTR; | ||
| 15 | #[doc = "`read()` method returns [rdtr::R](rdtr::R) reader structure"] | ||
| 16 | impl crate::can::bx::Readable for RDTR {} | ||
| 17 | #[doc = "CAN_RDT0R"] | ||
| 18 | pub mod rdtr; | ||
| 19 | #[doc = "CAN_RDL0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdlr](rdlr) module"] | ||
| 20 | pub type RDLR = crate::can::bx::Reg<u32, _RDLR>; | ||
| 21 | #[allow(missing_docs)] | ||
| 22 | #[doc(hidden)] | ||
| 23 | pub struct _RDLR; | ||
| 24 | #[doc = "`read()` method returns [rdlr::R](rdlr::R) reader structure"] | ||
| 25 | impl crate::can::bx::Readable for RDLR {} | ||
| 26 | #[doc = "CAN_RDL0R"] | ||
| 27 | pub mod rdlr; | ||
| 28 | #[doc = "CAN_RDH0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rdhr](rdhr) module"] | ||
| 29 | pub type RDHR = crate::can::bx::Reg<u32, _RDHR>; | ||
| 30 | #[allow(missing_docs)] | ||
| 31 | #[doc(hidden)] | ||
| 32 | pub struct _RDHR; | ||
| 33 | #[doc = "`read()` method returns [rdhr::R](rdhr::R) reader structure"] | ||
| 34 | impl crate::can::bx::Readable for RDHR {} | ||
| 35 | #[doc = "CAN_RDH0R"] | ||
| 36 | pub mod rdhr; | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rx/rdhr.rs b/embassy-stm32/src/can/bx/pac/can/rx/rdhr.rs deleted file mode 100644 index 0f3ccc307..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rx/rdhr.rs +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #[doc = "Reader of register RDHR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::RDHR>; | ||
| 3 | #[doc = "Reader of field `DATA7`"] | ||
| 4 | pub type DATA7_R = crate::can::bx::R<u8, u8>; | ||
| 5 | #[doc = "Reader of field `DATA6`"] | ||
| 6 | pub type DATA6_R = crate::can::bx::R<u8, u8>; | ||
| 7 | #[doc = "Reader of field `DATA5`"] | ||
| 8 | pub type DATA5_R = crate::can::bx::R<u8, u8>; | ||
| 9 | #[doc = "Reader of field `DATA4`"] | ||
| 10 | pub type DATA4_R = crate::can::bx::R<u8, u8>; | ||
| 11 | impl R { | ||
| 12 | #[doc = "Bits 24:31 - DATA7"] | ||
| 13 | #[inline(always)] | ||
| 14 | pub fn data7(&self) -> DATA7_R { | ||
| 15 | DATA7_R::new(((self.bits >> 24) & 0xff) as u8) | ||
| 16 | } | ||
| 17 | #[doc = "Bits 16:23 - DATA6"] | ||
| 18 | #[inline(always)] | ||
| 19 | pub fn data6(&self) -> DATA6_R { | ||
| 20 | DATA6_R::new(((self.bits >> 16) & 0xff) as u8) | ||
| 21 | } | ||
| 22 | #[doc = "Bits 8:15 - DATA5"] | ||
| 23 | #[inline(always)] | ||
| 24 | pub fn data5(&self) -> DATA5_R { | ||
| 25 | DATA5_R::new(((self.bits >> 8) & 0xff) as u8) | ||
| 26 | } | ||
| 27 | #[doc = "Bits 0:7 - DATA4"] | ||
| 28 | #[inline(always)] | ||
| 29 | pub fn data4(&self) -> DATA4_R { | ||
| 30 | DATA4_R::new((self.bits & 0xff) as u8) | ||
| 31 | } | ||
| 32 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rx/rdlr.rs b/embassy-stm32/src/can/bx/pac/can/rx/rdlr.rs deleted file mode 100644 index 16d739540..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rx/rdlr.rs +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #[doc = "Reader of register RDLR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::RDLR>; | ||
| 3 | #[doc = "Reader of field `DATA3`"] | ||
| 4 | pub type DATA3_R = crate::can::bx::R<u8, u8>; | ||
| 5 | #[doc = "Reader of field `DATA2`"] | ||
| 6 | pub type DATA2_R = crate::can::bx::R<u8, u8>; | ||
| 7 | #[doc = "Reader of field `DATA1`"] | ||
| 8 | pub type DATA1_R = crate::can::bx::R<u8, u8>; | ||
| 9 | #[doc = "Reader of field `DATA0`"] | ||
| 10 | pub type DATA0_R = crate::can::bx::R<u8, u8>; | ||
| 11 | impl R { | ||
| 12 | #[doc = "Bits 24:31 - DATA3"] | ||
| 13 | #[inline(always)] | ||
| 14 | pub fn data3(&self) -> DATA3_R { | ||
| 15 | DATA3_R::new(((self.bits >> 24) & 0xff) as u8) | ||
| 16 | } | ||
| 17 | #[doc = "Bits 16:23 - DATA2"] | ||
| 18 | #[inline(always)] | ||
| 19 | pub fn data2(&self) -> DATA2_R { | ||
| 20 | DATA2_R::new(((self.bits >> 16) & 0xff) as u8) | ||
| 21 | } | ||
| 22 | #[doc = "Bits 8:15 - DATA1"] | ||
| 23 | #[inline(always)] | ||
| 24 | pub fn data1(&self) -> DATA1_R { | ||
| 25 | DATA1_R::new(((self.bits >> 8) & 0xff) as u8) | ||
| 26 | } | ||
| 27 | #[doc = "Bits 0:7 - DATA0"] | ||
| 28 | #[inline(always)] | ||
| 29 | pub fn data0(&self) -> DATA0_R { | ||
| 30 | DATA0_R::new((self.bits & 0xff) as u8) | ||
| 31 | } | ||
| 32 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rx/rdtr.rs b/embassy-stm32/src/can/bx/pac/can/rx/rdtr.rs deleted file mode 100644 index 4a48e1f2e..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rx/rdtr.rs +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | #[doc = "Reader of register RDTR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::RDTR>; | ||
| 3 | #[doc = "Reader of field `TIME`"] | ||
| 4 | pub type TIME_R = crate::can::bx::R<u16, u16>; | ||
| 5 | #[doc = "Reader of field `FMI`"] | ||
| 6 | pub type FMI_R = crate::can::bx::R<u8, u8>; | ||
| 7 | #[doc = "Reader of field `DLC`"] | ||
| 8 | pub type DLC_R = crate::can::bx::R<u8, u8>; | ||
| 9 | impl R { | ||
| 10 | #[doc = "Bits 16:31 - TIME"] | ||
| 11 | #[inline(always)] | ||
| 12 | pub fn time(&self) -> TIME_R { | ||
| 13 | TIME_R::new(((self.bits >> 16) & 0xffff) as u16) | ||
| 14 | } | ||
| 15 | #[doc = "Bits 8:15 - FMI"] | ||
| 16 | #[inline(always)] | ||
| 17 | pub fn fmi(&self) -> FMI_R { | ||
| 18 | FMI_R::new(((self.bits >> 8) & 0xff) as u8) | ||
| 19 | } | ||
| 20 | #[doc = "Bits 0:3 - DLC"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub fn dlc(&self) -> DLC_R { | ||
| 23 | DLC_R::new((self.bits & 0x0f) as u8) | ||
| 24 | } | ||
| 25 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/rx/rir.rs b/embassy-stm32/src/can/bx/pac/can/rx/rir.rs deleted file mode 100644 index 22e37b1cd..000000000 --- a/embassy-stm32/src/can/bx/pac/can/rx/rir.rs +++ /dev/null | |||
| @@ -1,100 +0,0 @@ | |||
| 1 | #[doc = "Reader of register RIR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::RIR>; | ||
| 3 | #[doc = "Reader of field `STID`"] | ||
| 4 | pub type STID_R = crate::can::bx::R<u16, u16>; | ||
| 5 | #[doc = "Reader of field `EXID`"] | ||
| 6 | pub type EXID_R = crate::can::bx::R<u32, u32>; | ||
| 7 | #[doc = "IDE\n\nValue on reset: 0"] | ||
| 8 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 9 | pub enum IDE_A { | ||
| 10 | #[doc = "0: Standard identifier"] | ||
| 11 | STANDARD = 0, | ||
| 12 | #[doc = "1: Extended identifier"] | ||
| 13 | EXTENDED = 1, | ||
| 14 | } | ||
| 15 | impl From<IDE_A> for bool { | ||
| 16 | #[inline(always)] | ||
| 17 | fn from(variant: IDE_A) -> Self { | ||
| 18 | variant as u8 != 0 | ||
| 19 | } | ||
| 20 | } | ||
| 21 | #[doc = "Reader of field `IDE`"] | ||
| 22 | pub type IDE_R = crate::can::bx::R<bool, IDE_A>; | ||
| 23 | impl IDE_R { | ||
| 24 | #[doc = r"Get enumerated values variant"] | ||
| 25 | #[inline(always)] | ||
| 26 | pub fn variant(&self) -> IDE_A { | ||
| 27 | match self.bits { | ||
| 28 | false => IDE_A::STANDARD, | ||
| 29 | true => IDE_A::EXTENDED, | ||
| 30 | } | ||
| 31 | } | ||
| 32 | #[doc = "Checks if the value of the field is `STANDARD`"] | ||
| 33 | #[inline(always)] | ||
| 34 | pub fn is_standard(&self) -> bool { | ||
| 35 | *self == IDE_A::STANDARD | ||
| 36 | } | ||
| 37 | #[doc = "Checks if the value of the field is `EXTENDED`"] | ||
| 38 | #[inline(always)] | ||
| 39 | pub fn is_extended(&self) -> bool { | ||
| 40 | *self == IDE_A::EXTENDED | ||
| 41 | } | ||
| 42 | } | ||
| 43 | #[doc = "RTR\n\nValue on reset: 0"] | ||
| 44 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 45 | pub enum RTR_A { | ||
| 46 | #[doc = "0: Data frame"] | ||
| 47 | DATA = 0, | ||
| 48 | #[doc = "1: Remote frame"] | ||
| 49 | REMOTE = 1, | ||
| 50 | } | ||
| 51 | impl From<RTR_A> for bool { | ||
| 52 | #[inline(always)] | ||
| 53 | fn from(variant: RTR_A) -> Self { | ||
| 54 | variant as u8 != 0 | ||
| 55 | } | ||
| 56 | } | ||
| 57 | #[doc = "Reader of field `RTR`"] | ||
| 58 | pub type RTR_R = crate::can::bx::R<bool, RTR_A>; | ||
| 59 | impl RTR_R { | ||
| 60 | #[doc = r"Get enumerated values variant"] | ||
| 61 | #[inline(always)] | ||
| 62 | pub fn variant(&self) -> RTR_A { | ||
| 63 | match self.bits { | ||
| 64 | false => RTR_A::DATA, | ||
| 65 | true => RTR_A::REMOTE, | ||
| 66 | } | ||
| 67 | } | ||
| 68 | #[doc = "Checks if the value of the field is `DATA`"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn is_data(&self) -> bool { | ||
| 71 | *self == RTR_A::DATA | ||
| 72 | } | ||
| 73 | #[doc = "Checks if the value of the field is `REMOTE`"] | ||
| 74 | #[inline(always)] | ||
| 75 | pub fn is_remote(&self) -> bool { | ||
| 76 | *self == RTR_A::REMOTE | ||
| 77 | } | ||
| 78 | } | ||
| 79 | impl R { | ||
| 80 | #[doc = "Bits 21:31 - STID"] | ||
| 81 | #[inline(always)] | ||
| 82 | pub fn stid(&self) -> STID_R { | ||
| 83 | STID_R::new(((self.bits >> 21) & 0x07ff) as u16) | ||
| 84 | } | ||
| 85 | #[doc = "Bits 3:20 - EXID"] | ||
| 86 | #[inline(always)] | ||
| 87 | pub fn exid(&self) -> EXID_R { | ||
| 88 | EXID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) | ||
| 89 | } | ||
| 90 | #[doc = "Bit 2 - IDE"] | ||
| 91 | #[inline(always)] | ||
| 92 | pub fn ide(&self) -> IDE_R { | ||
| 93 | IDE_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 94 | } | ||
| 95 | #[doc = "Bit 1 - RTR"] | ||
| 96 | #[inline(always)] | ||
| 97 | pub fn rtr(&self) -> RTR_R { | ||
| 98 | RTR_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 99 | } | ||
| 100 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tsr.rs b/embassy-stm32/src/can/bx/pac/can/tsr.rs deleted file mode 100644 index 3317b7bd5..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tsr.rs +++ /dev/null | |||
| @@ -1,575 +0,0 @@ | |||
| 1 | #[doc = "Reader of register TSR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::TSR>; | ||
| 3 | #[doc = "Writer for register TSR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::TSR>; | ||
| 5 | #[doc = "Register TSR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::TSR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `LOW2`"] | ||
| 14 | pub type LOW2_R = crate::can::bx::R<bool, bool>; | ||
| 15 | #[doc = "Reader of field `LOW1`"] | ||
| 16 | pub type LOW1_R = crate::can::bx::R<bool, bool>; | ||
| 17 | #[doc = "Reader of field `LOW0`"] | ||
| 18 | pub type LOW0_R = crate::can::bx::R<bool, bool>; | ||
| 19 | #[doc = "Reader of field `TME2`"] | ||
| 20 | pub type TME2_R = crate::can::bx::R<bool, bool>; | ||
| 21 | #[doc = "Reader of field `TME1`"] | ||
| 22 | pub type TME1_R = crate::can::bx::R<bool, bool>; | ||
| 23 | #[doc = "Reader of field `TME0`"] | ||
| 24 | pub type TME0_R = crate::can::bx::R<bool, bool>; | ||
| 25 | #[doc = "Reader of field `CODE`"] | ||
| 26 | pub type CODE_R = crate::can::bx::R<u8, u8>; | ||
| 27 | #[doc = "Reader of field `ABRQ2`"] | ||
| 28 | pub type ABRQ2_R = crate::can::bx::R<bool, bool>; | ||
| 29 | #[doc = "Write proxy for field `ABRQ2`"] | ||
| 30 | pub struct ABRQ2_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> ABRQ2_W<'a> { | ||
| 34 | #[doc = r"Sets the field bit"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub fn set_bit(self) -> &'a mut W { | ||
| 37 | self.bit(true) | ||
| 38 | } | ||
| 39 | #[doc = r"Clears the field bit"] | ||
| 40 | #[inline(always)] | ||
| 41 | pub fn clear_bit(self) -> &'a mut W { | ||
| 42 | self.bit(false) | ||
| 43 | } | ||
| 44 | #[doc = r"Writes raw bits to the field"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 47 | self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); | ||
| 48 | self.w | ||
| 49 | } | ||
| 50 | } | ||
| 51 | #[doc = "Reader of field `TERR2`"] | ||
| 52 | pub type TERR2_R = crate::can::bx::R<bool, bool>; | ||
| 53 | #[doc = "Write proxy for field `TERR2`"] | ||
| 54 | pub struct TERR2_W<'a> { | ||
| 55 | w: &'a mut W, | ||
| 56 | } | ||
| 57 | impl<'a> TERR2_W<'a> { | ||
| 58 | #[doc = r"Sets the field bit"] | ||
| 59 | #[inline(always)] | ||
| 60 | pub fn set_bit(self) -> &'a mut W { | ||
| 61 | self.bit(true) | ||
| 62 | } | ||
| 63 | #[doc = r"Clears the field bit"] | ||
| 64 | #[inline(always)] | ||
| 65 | pub fn clear_bit(self) -> &'a mut W { | ||
| 66 | self.bit(false) | ||
| 67 | } | ||
| 68 | #[doc = r"Writes raw bits to the field"] | ||
| 69 | #[inline(always)] | ||
| 70 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 71 | self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); | ||
| 72 | self.w | ||
| 73 | } | ||
| 74 | } | ||
| 75 | #[doc = "Reader of field `ALST2`"] | ||
| 76 | pub type ALST2_R = crate::can::bx::R<bool, bool>; | ||
| 77 | #[doc = "Write proxy for field `ALST2`"] | ||
| 78 | pub struct ALST2_W<'a> { | ||
| 79 | w: &'a mut W, | ||
| 80 | } | ||
| 81 | impl<'a> ALST2_W<'a> { | ||
| 82 | #[doc = r"Sets the field bit"] | ||
| 83 | #[inline(always)] | ||
| 84 | pub fn set_bit(self) -> &'a mut W { | ||
| 85 | self.bit(true) | ||
| 86 | } | ||
| 87 | #[doc = r"Clears the field bit"] | ||
| 88 | #[inline(always)] | ||
| 89 | pub fn clear_bit(self) -> &'a mut W { | ||
| 90 | self.bit(false) | ||
| 91 | } | ||
| 92 | #[doc = r"Writes raw bits to the field"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 95 | self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); | ||
| 96 | self.w | ||
| 97 | } | ||
| 98 | } | ||
| 99 | #[doc = "Reader of field `TXOK2`"] | ||
| 100 | pub type TXOK2_R = crate::can::bx::R<bool, bool>; | ||
| 101 | #[doc = "Write proxy for field `TXOK2`"] | ||
| 102 | pub struct TXOK2_W<'a> { | ||
| 103 | w: &'a mut W, | ||
| 104 | } | ||
| 105 | impl<'a> TXOK2_W<'a> { | ||
| 106 | #[doc = r"Sets the field bit"] | ||
| 107 | #[inline(always)] | ||
| 108 | pub fn set_bit(self) -> &'a mut W { | ||
| 109 | self.bit(true) | ||
| 110 | } | ||
| 111 | #[doc = r"Clears the field bit"] | ||
| 112 | #[inline(always)] | ||
| 113 | pub fn clear_bit(self) -> &'a mut W { | ||
| 114 | self.bit(false) | ||
| 115 | } | ||
| 116 | #[doc = r"Writes raw bits to the field"] | ||
| 117 | #[inline(always)] | ||
| 118 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 119 | self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); | ||
| 120 | self.w | ||
| 121 | } | ||
| 122 | } | ||
| 123 | #[doc = "Reader of field `RQCP2`"] | ||
| 124 | pub type RQCP2_R = crate::can::bx::R<bool, bool>; | ||
| 125 | #[doc = "Write proxy for field `RQCP2`"] | ||
| 126 | pub struct RQCP2_W<'a> { | ||
| 127 | w: &'a mut W, | ||
| 128 | } | ||
| 129 | impl<'a> RQCP2_W<'a> { | ||
| 130 | #[doc = r"Sets the field bit"] | ||
| 131 | #[inline(always)] | ||
| 132 | pub fn set_bit(self) -> &'a mut W { | ||
| 133 | self.bit(true) | ||
| 134 | } | ||
| 135 | #[doc = r"Clears the field bit"] | ||
| 136 | #[inline(always)] | ||
| 137 | pub fn clear_bit(self) -> &'a mut W { | ||
| 138 | self.bit(false) | ||
| 139 | } | ||
| 140 | #[doc = r"Writes raw bits to the field"] | ||
| 141 | #[inline(always)] | ||
| 142 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 143 | self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); | ||
| 144 | self.w | ||
| 145 | } | ||
| 146 | } | ||
| 147 | #[doc = "Reader of field `ABRQ1`"] | ||
| 148 | pub type ABRQ1_R = crate::can::bx::R<bool, bool>; | ||
| 149 | #[doc = "Write proxy for field `ABRQ1`"] | ||
| 150 | pub struct ABRQ1_W<'a> { | ||
| 151 | w: &'a mut W, | ||
| 152 | } | ||
| 153 | impl<'a> ABRQ1_W<'a> { | ||
| 154 | #[doc = r"Sets the field bit"] | ||
| 155 | #[inline(always)] | ||
| 156 | pub fn set_bit(self) -> &'a mut W { | ||
| 157 | self.bit(true) | ||
| 158 | } | ||
| 159 | #[doc = r"Clears the field bit"] | ||
| 160 | #[inline(always)] | ||
| 161 | pub fn clear_bit(self) -> &'a mut W { | ||
| 162 | self.bit(false) | ||
| 163 | } | ||
| 164 | #[doc = r"Writes raw bits to the field"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 167 | self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); | ||
| 168 | self.w | ||
| 169 | } | ||
| 170 | } | ||
| 171 | #[doc = "Reader of field `TERR1`"] | ||
| 172 | pub type TERR1_R = crate::can::bx::R<bool, bool>; | ||
| 173 | #[doc = "Write proxy for field `TERR1`"] | ||
| 174 | pub struct TERR1_W<'a> { | ||
| 175 | w: &'a mut W, | ||
| 176 | } | ||
| 177 | impl<'a> TERR1_W<'a> { | ||
| 178 | #[doc = r"Sets the field bit"] | ||
| 179 | #[inline(always)] | ||
| 180 | pub fn set_bit(self) -> &'a mut W { | ||
| 181 | self.bit(true) | ||
| 182 | } | ||
| 183 | #[doc = r"Clears the field bit"] | ||
| 184 | #[inline(always)] | ||
| 185 | pub fn clear_bit(self) -> &'a mut W { | ||
| 186 | self.bit(false) | ||
| 187 | } | ||
| 188 | #[doc = r"Writes raw bits to the field"] | ||
| 189 | #[inline(always)] | ||
| 190 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 191 | self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); | ||
| 192 | self.w | ||
| 193 | } | ||
| 194 | } | ||
| 195 | #[doc = "Reader of field `ALST1`"] | ||
| 196 | pub type ALST1_R = crate::can::bx::R<bool, bool>; | ||
| 197 | #[doc = "Write proxy for field `ALST1`"] | ||
| 198 | pub struct ALST1_W<'a> { | ||
| 199 | w: &'a mut W, | ||
| 200 | } | ||
| 201 | impl<'a> ALST1_W<'a> { | ||
| 202 | #[doc = r"Sets the field bit"] | ||
| 203 | #[inline(always)] | ||
| 204 | pub fn set_bit(self) -> &'a mut W { | ||
| 205 | self.bit(true) | ||
| 206 | } | ||
| 207 | #[doc = r"Clears the field bit"] | ||
| 208 | #[inline(always)] | ||
| 209 | pub fn clear_bit(self) -> &'a mut W { | ||
| 210 | self.bit(false) | ||
| 211 | } | ||
| 212 | #[doc = r"Writes raw bits to the field"] | ||
| 213 | #[inline(always)] | ||
| 214 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 215 | self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); | ||
| 216 | self.w | ||
| 217 | } | ||
| 218 | } | ||
| 219 | #[doc = "Reader of field `TXOK1`"] | ||
| 220 | pub type TXOK1_R = crate::can::bx::R<bool, bool>; | ||
| 221 | #[doc = "Write proxy for field `TXOK1`"] | ||
| 222 | pub struct TXOK1_W<'a> { | ||
| 223 | w: &'a mut W, | ||
| 224 | } | ||
| 225 | impl<'a> TXOK1_W<'a> { | ||
| 226 | #[doc = r"Sets the field bit"] | ||
| 227 | #[inline(always)] | ||
| 228 | pub fn set_bit(self) -> &'a mut W { | ||
| 229 | self.bit(true) | ||
| 230 | } | ||
| 231 | #[doc = r"Clears the field bit"] | ||
| 232 | #[inline(always)] | ||
| 233 | pub fn clear_bit(self) -> &'a mut W { | ||
| 234 | self.bit(false) | ||
| 235 | } | ||
| 236 | #[doc = r"Writes raw bits to the field"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 239 | self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); | ||
| 240 | self.w | ||
| 241 | } | ||
| 242 | } | ||
| 243 | #[doc = "Reader of field `RQCP1`"] | ||
| 244 | pub type RQCP1_R = crate::can::bx::R<bool, bool>; | ||
| 245 | #[doc = "Write proxy for field `RQCP1`"] | ||
| 246 | pub struct RQCP1_W<'a> { | ||
| 247 | w: &'a mut W, | ||
| 248 | } | ||
| 249 | impl<'a> RQCP1_W<'a> { | ||
| 250 | #[doc = r"Sets the field bit"] | ||
| 251 | #[inline(always)] | ||
| 252 | pub fn set_bit(self) -> &'a mut W { | ||
| 253 | self.bit(true) | ||
| 254 | } | ||
| 255 | #[doc = r"Clears the field bit"] | ||
| 256 | #[inline(always)] | ||
| 257 | pub fn clear_bit(self) -> &'a mut W { | ||
| 258 | self.bit(false) | ||
| 259 | } | ||
| 260 | #[doc = r"Writes raw bits to the field"] | ||
| 261 | #[inline(always)] | ||
| 262 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 263 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 264 | self.w | ||
| 265 | } | ||
| 266 | } | ||
| 267 | #[doc = "Reader of field `ABRQ0`"] | ||
| 268 | pub type ABRQ0_R = crate::can::bx::R<bool, bool>; | ||
| 269 | #[doc = "Write proxy for field `ABRQ0`"] | ||
| 270 | pub struct ABRQ0_W<'a> { | ||
| 271 | w: &'a mut W, | ||
| 272 | } | ||
| 273 | impl<'a> ABRQ0_W<'a> { | ||
| 274 | #[doc = r"Sets the field bit"] | ||
| 275 | #[inline(always)] | ||
| 276 | pub fn set_bit(self) -> &'a mut W { | ||
| 277 | self.bit(true) | ||
| 278 | } | ||
| 279 | #[doc = r"Clears the field bit"] | ||
| 280 | #[inline(always)] | ||
| 281 | pub fn clear_bit(self) -> &'a mut W { | ||
| 282 | self.bit(false) | ||
| 283 | } | ||
| 284 | #[doc = r"Writes raw bits to the field"] | ||
| 285 | #[inline(always)] | ||
| 286 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 287 | self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); | ||
| 288 | self.w | ||
| 289 | } | ||
| 290 | } | ||
| 291 | #[doc = "Reader of field `TERR0`"] | ||
| 292 | pub type TERR0_R = crate::can::bx::R<bool, bool>; | ||
| 293 | #[doc = "Write proxy for field `TERR0`"] | ||
| 294 | pub struct TERR0_W<'a> { | ||
| 295 | w: &'a mut W, | ||
| 296 | } | ||
| 297 | impl<'a> TERR0_W<'a> { | ||
| 298 | #[doc = r"Sets the field bit"] | ||
| 299 | #[inline(always)] | ||
| 300 | pub fn set_bit(self) -> &'a mut W { | ||
| 301 | self.bit(true) | ||
| 302 | } | ||
| 303 | #[doc = r"Clears the field bit"] | ||
| 304 | #[inline(always)] | ||
| 305 | pub fn clear_bit(self) -> &'a mut W { | ||
| 306 | self.bit(false) | ||
| 307 | } | ||
| 308 | #[doc = r"Writes raw bits to the field"] | ||
| 309 | #[inline(always)] | ||
| 310 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 311 | self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); | ||
| 312 | self.w | ||
| 313 | } | ||
| 314 | } | ||
| 315 | #[doc = "Reader of field `ALST0`"] | ||
| 316 | pub type ALST0_R = crate::can::bx::R<bool, bool>; | ||
| 317 | #[doc = "Write proxy for field `ALST0`"] | ||
| 318 | pub struct ALST0_W<'a> { | ||
| 319 | w: &'a mut W, | ||
| 320 | } | ||
| 321 | impl<'a> ALST0_W<'a> { | ||
| 322 | #[doc = r"Sets the field bit"] | ||
| 323 | #[inline(always)] | ||
| 324 | pub fn set_bit(self) -> &'a mut W { | ||
| 325 | self.bit(true) | ||
| 326 | } | ||
| 327 | #[doc = r"Clears the field bit"] | ||
| 328 | #[inline(always)] | ||
| 329 | pub fn clear_bit(self) -> &'a mut W { | ||
| 330 | self.bit(false) | ||
| 331 | } | ||
| 332 | #[doc = r"Writes raw bits to the field"] | ||
| 333 | #[inline(always)] | ||
| 334 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 335 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 336 | self.w | ||
| 337 | } | ||
| 338 | } | ||
| 339 | #[doc = "Reader of field `TXOK0`"] | ||
| 340 | pub type TXOK0_R = crate::can::bx::R<bool, bool>; | ||
| 341 | #[doc = "Write proxy for field `TXOK0`"] | ||
| 342 | pub struct TXOK0_W<'a> { | ||
| 343 | w: &'a mut W, | ||
| 344 | } | ||
| 345 | impl<'a> TXOK0_W<'a> { | ||
| 346 | #[doc = r"Sets the field bit"] | ||
| 347 | #[inline(always)] | ||
| 348 | pub fn set_bit(self) -> &'a mut W { | ||
| 349 | self.bit(true) | ||
| 350 | } | ||
| 351 | #[doc = r"Clears the field bit"] | ||
| 352 | #[inline(always)] | ||
| 353 | pub fn clear_bit(self) -> &'a mut W { | ||
| 354 | self.bit(false) | ||
| 355 | } | ||
| 356 | #[doc = r"Writes raw bits to the field"] | ||
| 357 | #[inline(always)] | ||
| 358 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 359 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 360 | self.w | ||
| 361 | } | ||
| 362 | } | ||
| 363 | #[doc = "Reader of field `RQCP0`"] | ||
| 364 | pub type RQCP0_R = crate::can::bx::R<bool, bool>; | ||
| 365 | #[doc = "Write proxy for field `RQCP0`"] | ||
| 366 | pub struct RQCP0_W<'a> { | ||
| 367 | w: &'a mut W, | ||
| 368 | } | ||
| 369 | impl<'a> RQCP0_W<'a> { | ||
| 370 | #[doc = r"Sets the field bit"] | ||
| 371 | #[inline(always)] | ||
| 372 | pub fn set_bit(self) -> &'a mut W { | ||
| 373 | self.bit(true) | ||
| 374 | } | ||
| 375 | #[doc = r"Clears the field bit"] | ||
| 376 | #[inline(always)] | ||
| 377 | pub fn clear_bit(self) -> &'a mut W { | ||
| 378 | self.bit(false) | ||
| 379 | } | ||
| 380 | #[doc = r"Writes raw bits to the field"] | ||
| 381 | #[inline(always)] | ||
| 382 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 383 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 384 | self.w | ||
| 385 | } | ||
| 386 | } | ||
| 387 | impl R { | ||
| 388 | #[doc = "Bit 31 - Lowest priority flag for mailbox 2"] | ||
| 389 | #[inline(always)] | ||
| 390 | pub fn low2(&self) -> LOW2_R { | ||
| 391 | LOW2_R::new(((self.bits >> 31) & 0x01) != 0) | ||
| 392 | } | ||
| 393 | #[doc = "Bit 30 - Lowest priority flag for mailbox 1"] | ||
| 394 | #[inline(always)] | ||
| 395 | pub fn low1(&self) -> LOW1_R { | ||
| 396 | LOW1_R::new(((self.bits >> 30) & 0x01) != 0) | ||
| 397 | } | ||
| 398 | #[doc = "Bit 29 - Lowest priority flag for mailbox 0"] | ||
| 399 | #[inline(always)] | ||
| 400 | pub fn low0(&self) -> LOW0_R { | ||
| 401 | LOW0_R::new(((self.bits >> 29) & 0x01) != 0) | ||
| 402 | } | ||
| 403 | #[doc = "Bit 28 - Lowest priority flag for mailbox 2"] | ||
| 404 | #[inline(always)] | ||
| 405 | pub fn tme2(&self) -> TME2_R { | ||
| 406 | TME2_R::new(((self.bits >> 28) & 0x01) != 0) | ||
| 407 | } | ||
| 408 | #[doc = "Bit 27 - Lowest priority flag for mailbox 1"] | ||
| 409 | #[inline(always)] | ||
| 410 | pub fn tme1(&self) -> TME1_R { | ||
| 411 | TME1_R::new(((self.bits >> 27) & 0x01) != 0) | ||
| 412 | } | ||
| 413 | #[doc = "Bit 26 - Lowest priority flag for mailbox 0"] | ||
| 414 | #[inline(always)] | ||
| 415 | pub fn tme0(&self) -> TME0_R { | ||
| 416 | TME0_R::new(((self.bits >> 26) & 0x01) != 0) | ||
| 417 | } | ||
| 418 | #[doc = "Bits 24:25 - CODE"] | ||
| 419 | #[inline(always)] | ||
| 420 | pub fn code(&self) -> CODE_R { | ||
| 421 | CODE_R::new(((self.bits >> 24) & 0x03) as u8) | ||
| 422 | } | ||
| 423 | #[doc = "Bit 23 - ABRQ2"] | ||
| 424 | #[inline(always)] | ||
| 425 | pub fn abrq2(&self) -> ABRQ2_R { | ||
| 426 | ABRQ2_R::new(((self.bits >> 23) & 0x01) != 0) | ||
| 427 | } | ||
| 428 | #[doc = "Bit 19 - TERR2"] | ||
| 429 | #[inline(always)] | ||
| 430 | pub fn terr2(&self) -> TERR2_R { | ||
| 431 | TERR2_R::new(((self.bits >> 19) & 0x01) != 0) | ||
| 432 | } | ||
| 433 | #[doc = "Bit 18 - ALST2"] | ||
| 434 | #[inline(always)] | ||
| 435 | pub fn alst2(&self) -> ALST2_R { | ||
| 436 | ALST2_R::new(((self.bits >> 18) & 0x01) != 0) | ||
| 437 | } | ||
| 438 | #[doc = "Bit 17 - TXOK2"] | ||
| 439 | #[inline(always)] | ||
| 440 | pub fn txok2(&self) -> TXOK2_R { | ||
| 441 | TXOK2_R::new(((self.bits >> 17) & 0x01) != 0) | ||
| 442 | } | ||
| 443 | #[doc = "Bit 16 - RQCP2"] | ||
| 444 | #[inline(always)] | ||
| 445 | pub fn rqcp2(&self) -> RQCP2_R { | ||
| 446 | RQCP2_R::new(((self.bits >> 16) & 0x01) != 0) | ||
| 447 | } | ||
| 448 | #[doc = "Bit 15 - ABRQ1"] | ||
| 449 | #[inline(always)] | ||
| 450 | pub fn abrq1(&self) -> ABRQ1_R { | ||
| 451 | ABRQ1_R::new(((self.bits >> 15) & 0x01) != 0) | ||
| 452 | } | ||
| 453 | #[doc = "Bit 11 - TERR1"] | ||
| 454 | #[inline(always)] | ||
| 455 | pub fn terr1(&self) -> TERR1_R { | ||
| 456 | TERR1_R::new(((self.bits >> 11) & 0x01) != 0) | ||
| 457 | } | ||
| 458 | #[doc = "Bit 10 - ALST1"] | ||
| 459 | #[inline(always)] | ||
| 460 | pub fn alst1(&self) -> ALST1_R { | ||
| 461 | ALST1_R::new(((self.bits >> 10) & 0x01) != 0) | ||
| 462 | } | ||
| 463 | #[doc = "Bit 9 - TXOK1"] | ||
| 464 | #[inline(always)] | ||
| 465 | pub fn txok1(&self) -> TXOK1_R { | ||
| 466 | TXOK1_R::new(((self.bits >> 9) & 0x01) != 0) | ||
| 467 | } | ||
| 468 | #[doc = "Bit 8 - RQCP1"] | ||
| 469 | #[inline(always)] | ||
| 470 | pub fn rqcp1(&self) -> RQCP1_R { | ||
| 471 | RQCP1_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 472 | } | ||
| 473 | #[doc = "Bit 7 - ABRQ0"] | ||
| 474 | #[inline(always)] | ||
| 475 | pub fn abrq0(&self) -> ABRQ0_R { | ||
| 476 | ABRQ0_R::new(((self.bits >> 7) & 0x01) != 0) | ||
| 477 | } | ||
| 478 | #[doc = "Bit 3 - TERR0"] | ||
| 479 | #[inline(always)] | ||
| 480 | pub fn terr0(&self) -> TERR0_R { | ||
| 481 | TERR0_R::new(((self.bits >> 3) & 0x01) != 0) | ||
| 482 | } | ||
| 483 | #[doc = "Bit 2 - ALST0"] | ||
| 484 | #[inline(always)] | ||
| 485 | pub fn alst0(&self) -> ALST0_R { | ||
| 486 | ALST0_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 487 | } | ||
| 488 | #[doc = "Bit 1 - TXOK0"] | ||
| 489 | #[inline(always)] | ||
| 490 | pub fn txok0(&self) -> TXOK0_R { | ||
| 491 | TXOK0_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 492 | } | ||
| 493 | #[doc = "Bit 0 - RQCP0"] | ||
| 494 | #[inline(always)] | ||
| 495 | pub fn rqcp0(&self) -> RQCP0_R { | ||
| 496 | RQCP0_R::new((self.bits & 0x01) != 0) | ||
| 497 | } | ||
| 498 | } | ||
| 499 | impl W { | ||
| 500 | #[doc = "Bit 23 - ABRQ2"] | ||
| 501 | #[inline(always)] | ||
| 502 | pub fn abrq2(&mut self) -> ABRQ2_W { | ||
| 503 | ABRQ2_W { w: self } | ||
| 504 | } | ||
| 505 | #[doc = "Bit 19 - TERR2"] | ||
| 506 | #[inline(always)] | ||
| 507 | pub fn terr2(&mut self) -> TERR2_W { | ||
| 508 | TERR2_W { w: self } | ||
| 509 | } | ||
| 510 | #[doc = "Bit 18 - ALST2"] | ||
| 511 | #[inline(always)] | ||
| 512 | pub fn alst2(&mut self) -> ALST2_W { | ||
| 513 | ALST2_W { w: self } | ||
| 514 | } | ||
| 515 | #[doc = "Bit 17 - TXOK2"] | ||
| 516 | #[inline(always)] | ||
| 517 | pub fn txok2(&mut self) -> TXOK2_W { | ||
| 518 | TXOK2_W { w: self } | ||
| 519 | } | ||
| 520 | #[doc = "Bit 16 - RQCP2"] | ||
| 521 | #[inline(always)] | ||
| 522 | pub fn rqcp2(&mut self) -> RQCP2_W { | ||
| 523 | RQCP2_W { w: self } | ||
| 524 | } | ||
| 525 | #[doc = "Bit 15 - ABRQ1"] | ||
| 526 | #[inline(always)] | ||
| 527 | pub fn abrq1(&mut self) -> ABRQ1_W { | ||
| 528 | ABRQ1_W { w: self } | ||
| 529 | } | ||
| 530 | #[doc = "Bit 11 - TERR1"] | ||
| 531 | #[inline(always)] | ||
| 532 | pub fn terr1(&mut self) -> TERR1_W { | ||
| 533 | TERR1_W { w: self } | ||
| 534 | } | ||
| 535 | #[doc = "Bit 10 - ALST1"] | ||
| 536 | #[inline(always)] | ||
| 537 | pub fn alst1(&mut self) -> ALST1_W { | ||
| 538 | ALST1_W { w: self } | ||
| 539 | } | ||
| 540 | #[doc = "Bit 9 - TXOK1"] | ||
| 541 | #[inline(always)] | ||
| 542 | pub fn txok1(&mut self) -> TXOK1_W { | ||
| 543 | TXOK1_W { w: self } | ||
| 544 | } | ||
| 545 | #[doc = "Bit 8 - RQCP1"] | ||
| 546 | #[inline(always)] | ||
| 547 | pub fn rqcp1(&mut self) -> RQCP1_W { | ||
| 548 | RQCP1_W { w: self } | ||
| 549 | } | ||
| 550 | #[doc = "Bit 7 - ABRQ0"] | ||
| 551 | #[inline(always)] | ||
| 552 | pub fn abrq0(&mut self) -> ABRQ0_W { | ||
| 553 | ABRQ0_W { w: self } | ||
| 554 | } | ||
| 555 | #[doc = "Bit 3 - TERR0"] | ||
| 556 | #[inline(always)] | ||
| 557 | pub fn terr0(&mut self) -> TERR0_W { | ||
| 558 | TERR0_W { w: self } | ||
| 559 | } | ||
| 560 | #[doc = "Bit 2 - ALST0"] | ||
| 561 | #[inline(always)] | ||
| 562 | pub fn alst0(&mut self) -> ALST0_W { | ||
| 563 | ALST0_W { w: self } | ||
| 564 | } | ||
| 565 | #[doc = "Bit 1 - TXOK0"] | ||
| 566 | #[inline(always)] | ||
| 567 | pub fn txok0(&mut self) -> TXOK0_W { | ||
| 568 | TXOK0_W { w: self } | ||
| 569 | } | ||
| 570 | #[doc = "Bit 0 - RQCP0"] | ||
| 571 | #[inline(always)] | ||
| 572 | pub fn rqcp0(&mut self) -> RQCP0_W { | ||
| 573 | RQCP0_W { w: self } | ||
| 574 | } | ||
| 575 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tx.rs b/embassy-stm32/src/can/bx/pac/can/tx.rs deleted file mode 100644 index f45eb47cc..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tx.rs +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | #[doc = "CAN_TI0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tir](tir) module"] | ||
| 2 | pub type TIR = crate::can::bx::Reg<u32, _TIR>; | ||
| 3 | #[allow(missing_docs)] | ||
| 4 | #[doc(hidden)] | ||
| 5 | pub struct _TIR; | ||
| 6 | #[doc = "`read()` method returns [tir::R](tir::R) reader structure"] | ||
| 7 | impl crate::can::bx::Readable for TIR {} | ||
| 8 | #[doc = "`write(|w| ..)` method takes [tir::W](tir::W) writer structure"] | ||
| 9 | impl crate::can::bx::Writable for TIR {} | ||
| 10 | #[doc = "CAN_TI0R"] | ||
| 11 | pub mod tir; | ||
| 12 | #[doc = "CAN_TDT0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdtr](tdtr) module"] | ||
| 13 | pub type TDTR = crate::can::bx::Reg<u32, _TDTR>; | ||
| 14 | #[allow(missing_docs)] | ||
| 15 | #[doc(hidden)] | ||
| 16 | pub struct _TDTR; | ||
| 17 | #[doc = "`read()` method returns [tdtr::R](tdtr::R) reader structure"] | ||
| 18 | impl crate::can::bx::Readable for TDTR {} | ||
| 19 | #[doc = "`write(|w| ..)` method takes [tdtr::W](tdtr::W) writer structure"] | ||
| 20 | impl crate::can::bx::Writable for TDTR {} | ||
| 21 | #[doc = "CAN_TDT0R"] | ||
| 22 | pub mod tdtr; | ||
| 23 | #[doc = "CAN_TDL0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdlr](tdlr) module"] | ||
| 24 | pub type TDLR = crate::can::bx::Reg<u32, _TDLR>; | ||
| 25 | #[allow(missing_docs)] | ||
| 26 | #[doc(hidden)] | ||
| 27 | pub struct _TDLR; | ||
| 28 | #[doc = "`read()` method returns [tdlr::R](tdlr::R) reader structure"] | ||
| 29 | impl crate::can::bx::Readable for TDLR {} | ||
| 30 | #[doc = "`write(|w| ..)` method takes [tdlr::W](tdlr::W) writer structure"] | ||
| 31 | impl crate::can::bx::Writable for TDLR {} | ||
| 32 | #[doc = "CAN_TDL0R"] | ||
| 33 | pub mod tdlr; | ||
| 34 | #[doc = "CAN_TDH0R\n\nThis register you can [`read`](crate::can::bx::generic::Reg::read), [`reset`](crate::can::bx::generic::Reg::reset), [`write`](crate::can::bx::generic::Reg::write), [`write_with_zero`](crate::can::bx::generic::Reg::write_with_zero), [`modify`](crate::can::bx::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdhr](tdhr) module"] | ||
| 35 | pub type TDHR = crate::can::bx::Reg<u32, _TDHR>; | ||
| 36 | #[allow(missing_docs)] | ||
| 37 | #[doc(hidden)] | ||
| 38 | pub struct _TDHR; | ||
| 39 | #[doc = "`read()` method returns [tdhr::R](tdhr::R) reader structure"] | ||
| 40 | impl crate::can::bx::Readable for TDHR {} | ||
| 41 | #[doc = "`write(|w| ..)` method takes [tdhr::W](tdhr::W) writer structure"] | ||
| 42 | impl crate::can::bx::Writable for TDHR {} | ||
| 43 | #[doc = "CAN_TDH0R"] | ||
| 44 | pub mod tdhr; | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tx/tdhr.rs b/embassy-stm32/src/can/bx/pac/can/tx/tdhr.rs deleted file mode 100644 index 9c2209b99..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tx/tdhr.rs +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | #[doc = "Reader of register TDHR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::TDHR>; | ||
| 3 | #[doc = "Writer for register TDHR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::TDHR>; | ||
| 5 | #[doc = "Register TDHR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::TDHR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `DATA7`"] | ||
| 14 | pub type DATA7_R = crate::can::bx::R<u8, u8>; | ||
| 15 | #[doc = "Write proxy for field `DATA7`"] | ||
| 16 | pub struct DATA7_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> DATA7_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `DATA6`"] | ||
| 28 | pub type DATA6_R = crate::can::bx::R<u8, u8>; | ||
| 29 | #[doc = "Write proxy for field `DATA6`"] | ||
| 30 | pub struct DATA6_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> DATA6_W<'a> { | ||
| 34 | #[doc = r"Writes raw bits to the field"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 37 | self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); | ||
| 38 | self.w | ||
| 39 | } | ||
| 40 | } | ||
| 41 | #[doc = "Reader of field `DATA5`"] | ||
| 42 | pub type DATA5_R = crate::can::bx::R<u8, u8>; | ||
| 43 | #[doc = "Write proxy for field `DATA5`"] | ||
| 44 | pub struct DATA5_W<'a> { | ||
| 45 | w: &'a mut W, | ||
| 46 | } | ||
| 47 | impl<'a> DATA5_W<'a> { | ||
| 48 | #[doc = r"Writes raw bits to the field"] | ||
| 49 | #[inline(always)] | ||
| 50 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 51 | self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); | ||
| 52 | self.w | ||
| 53 | } | ||
| 54 | } | ||
| 55 | #[doc = "Reader of field `DATA4`"] | ||
| 56 | pub type DATA4_R = crate::can::bx::R<u8, u8>; | ||
| 57 | #[doc = "Write proxy for field `DATA4`"] | ||
| 58 | pub struct DATA4_W<'a> { | ||
| 59 | w: &'a mut W, | ||
| 60 | } | ||
| 61 | impl<'a> DATA4_W<'a> { | ||
| 62 | #[doc = r"Writes raw bits to the field"] | ||
| 63 | #[inline(always)] | ||
| 64 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 65 | self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); | ||
| 66 | self.w | ||
| 67 | } | ||
| 68 | } | ||
| 69 | impl R { | ||
| 70 | #[doc = "Bits 24:31 - DATA7"] | ||
| 71 | #[inline(always)] | ||
| 72 | pub fn data7(&self) -> DATA7_R { | ||
| 73 | DATA7_R::new(((self.bits >> 24) & 0xff) as u8) | ||
| 74 | } | ||
| 75 | #[doc = "Bits 16:23 - DATA6"] | ||
| 76 | #[inline(always)] | ||
| 77 | pub fn data6(&self) -> DATA6_R { | ||
| 78 | DATA6_R::new(((self.bits >> 16) & 0xff) as u8) | ||
| 79 | } | ||
| 80 | #[doc = "Bits 8:15 - DATA5"] | ||
| 81 | #[inline(always)] | ||
| 82 | pub fn data5(&self) -> DATA5_R { | ||
| 83 | DATA5_R::new(((self.bits >> 8) & 0xff) as u8) | ||
| 84 | } | ||
| 85 | #[doc = "Bits 0:7 - DATA4"] | ||
| 86 | #[inline(always)] | ||
| 87 | pub fn data4(&self) -> DATA4_R { | ||
| 88 | DATA4_R::new((self.bits & 0xff) as u8) | ||
| 89 | } | ||
| 90 | } | ||
| 91 | impl W { | ||
| 92 | #[doc = "Bits 24:31 - DATA7"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn data7(&mut self) -> DATA7_W { | ||
| 95 | DATA7_W { w: self } | ||
| 96 | } | ||
| 97 | #[doc = "Bits 16:23 - DATA6"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn data6(&mut self) -> DATA6_W { | ||
| 100 | DATA6_W { w: self } | ||
| 101 | } | ||
| 102 | #[doc = "Bits 8:15 - DATA5"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn data5(&mut self) -> DATA5_W { | ||
| 105 | DATA5_W { w: self } | ||
| 106 | } | ||
| 107 | #[doc = "Bits 0:7 - DATA4"] | ||
| 108 | #[inline(always)] | ||
| 109 | pub fn data4(&mut self) -> DATA4_W { | ||
| 110 | DATA4_W { w: self } | ||
| 111 | } | ||
| 112 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tx/tdlr.rs b/embassy-stm32/src/can/bx/pac/can/tx/tdlr.rs deleted file mode 100644 index d67589f99..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tx/tdlr.rs +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | #[doc = "Reader of register TDLR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::TDLR>; | ||
| 3 | #[doc = "Writer for register TDLR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::TDLR>; | ||
| 5 | #[doc = "Register TDLR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::TDLR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `DATA3`"] | ||
| 14 | pub type DATA3_R = crate::can::bx::R<u8, u8>; | ||
| 15 | #[doc = "Write proxy for field `DATA3`"] | ||
| 16 | pub struct DATA3_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> DATA3_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `DATA2`"] | ||
| 28 | pub type DATA2_R = crate::can::bx::R<u8, u8>; | ||
| 29 | #[doc = "Write proxy for field `DATA2`"] | ||
| 30 | pub struct DATA2_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> DATA2_W<'a> { | ||
| 34 | #[doc = r"Writes raw bits to the field"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 37 | self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); | ||
| 38 | self.w | ||
| 39 | } | ||
| 40 | } | ||
| 41 | #[doc = "Reader of field `DATA1`"] | ||
| 42 | pub type DATA1_R = crate::can::bx::R<u8, u8>; | ||
| 43 | #[doc = "Write proxy for field `DATA1`"] | ||
| 44 | pub struct DATA1_W<'a> { | ||
| 45 | w: &'a mut W, | ||
| 46 | } | ||
| 47 | impl<'a> DATA1_W<'a> { | ||
| 48 | #[doc = r"Writes raw bits to the field"] | ||
| 49 | #[inline(always)] | ||
| 50 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 51 | self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); | ||
| 52 | self.w | ||
| 53 | } | ||
| 54 | } | ||
| 55 | #[doc = "Reader of field `DATA0`"] | ||
| 56 | pub type DATA0_R = crate::can::bx::R<u8, u8>; | ||
| 57 | #[doc = "Write proxy for field `DATA0`"] | ||
| 58 | pub struct DATA0_W<'a> { | ||
| 59 | w: &'a mut W, | ||
| 60 | } | ||
| 61 | impl<'a> DATA0_W<'a> { | ||
| 62 | #[doc = r"Writes raw bits to the field"] | ||
| 63 | #[inline(always)] | ||
| 64 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 65 | self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); | ||
| 66 | self.w | ||
| 67 | } | ||
| 68 | } | ||
| 69 | impl R { | ||
| 70 | #[doc = "Bits 24:31 - DATA3"] | ||
| 71 | #[inline(always)] | ||
| 72 | pub fn data3(&self) -> DATA3_R { | ||
| 73 | DATA3_R::new(((self.bits >> 24) & 0xff) as u8) | ||
| 74 | } | ||
| 75 | #[doc = "Bits 16:23 - DATA2"] | ||
| 76 | #[inline(always)] | ||
| 77 | pub fn data2(&self) -> DATA2_R { | ||
| 78 | DATA2_R::new(((self.bits >> 16) & 0xff) as u8) | ||
| 79 | } | ||
| 80 | #[doc = "Bits 8:15 - DATA1"] | ||
| 81 | #[inline(always)] | ||
| 82 | pub fn data1(&self) -> DATA1_R { | ||
| 83 | DATA1_R::new(((self.bits >> 8) & 0xff) as u8) | ||
| 84 | } | ||
| 85 | #[doc = "Bits 0:7 - DATA0"] | ||
| 86 | #[inline(always)] | ||
| 87 | pub fn data0(&self) -> DATA0_R { | ||
| 88 | DATA0_R::new((self.bits & 0xff) as u8) | ||
| 89 | } | ||
| 90 | } | ||
| 91 | impl W { | ||
| 92 | #[doc = "Bits 24:31 - DATA3"] | ||
| 93 | #[inline(always)] | ||
| 94 | pub fn data3(&mut self) -> DATA3_W { | ||
| 95 | DATA3_W { w: self } | ||
| 96 | } | ||
| 97 | #[doc = "Bits 16:23 - DATA2"] | ||
| 98 | #[inline(always)] | ||
| 99 | pub fn data2(&mut self) -> DATA2_W { | ||
| 100 | DATA2_W { w: self } | ||
| 101 | } | ||
| 102 | #[doc = "Bits 8:15 - DATA1"] | ||
| 103 | #[inline(always)] | ||
| 104 | pub fn data1(&mut self) -> DATA1_W { | ||
| 105 | DATA1_W { w: self } | ||
| 106 | } | ||
| 107 | #[doc = "Bits 0:7 - DATA0"] | ||
| 108 | #[inline(always)] | ||
| 109 | pub fn data0(&mut self) -> DATA0_W { | ||
| 110 | DATA0_W { w: self } | ||
| 111 | } | ||
| 112 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tx/tdtr.rs b/embassy-stm32/src/can/bx/pac/can/tx/tdtr.rs deleted file mode 100644 index cf748ba29..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tx/tdtr.rs +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | #[doc = "Reader of register TDTR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::TDTR>; | ||
| 3 | #[doc = "Writer for register TDTR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::TDTR>; | ||
| 5 | #[doc = "Register TDTR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::TDTR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `TIME`"] | ||
| 14 | pub type TIME_R = crate::can::bx::R<u16, u16>; | ||
| 15 | #[doc = "Write proxy for field `TIME`"] | ||
| 16 | pub struct TIME_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> TIME_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u16) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `TGT`"] | ||
| 28 | pub type TGT_R = crate::can::bx::R<bool, bool>; | ||
| 29 | #[doc = "Write proxy for field `TGT`"] | ||
| 30 | pub struct TGT_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> TGT_W<'a> { | ||
| 34 | #[doc = r"Sets the field bit"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub fn set_bit(self) -> &'a mut W { | ||
| 37 | self.bit(true) | ||
| 38 | } | ||
| 39 | #[doc = r"Clears the field bit"] | ||
| 40 | #[inline(always)] | ||
| 41 | pub fn clear_bit(self) -> &'a mut W { | ||
| 42 | self.bit(false) | ||
| 43 | } | ||
| 44 | #[doc = r"Writes raw bits to the field"] | ||
| 45 | #[inline(always)] | ||
| 46 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 47 | self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); | ||
| 48 | self.w | ||
| 49 | } | ||
| 50 | } | ||
| 51 | #[doc = "Reader of field `DLC`"] | ||
| 52 | pub type DLC_R = crate::can::bx::R<u8, u8>; | ||
| 53 | #[doc = "Write proxy for field `DLC`"] | ||
| 54 | pub struct DLC_W<'a> { | ||
| 55 | w: &'a mut W, | ||
| 56 | } | ||
| 57 | impl<'a> DLC_W<'a> { | ||
| 58 | #[doc = r"Writes raw bits to the field"] | ||
| 59 | #[inline(always)] | ||
| 60 | pub unsafe fn bits(self, value: u8) -> &'a mut W { | ||
| 61 | self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); | ||
| 62 | self.w | ||
| 63 | } | ||
| 64 | } | ||
| 65 | impl R { | ||
| 66 | #[doc = "Bits 16:31 - TIME"] | ||
| 67 | #[inline(always)] | ||
| 68 | pub fn time(&self) -> TIME_R { | ||
| 69 | TIME_R::new(((self.bits >> 16) & 0xffff) as u16) | ||
| 70 | } | ||
| 71 | #[doc = "Bit 8 - TGT"] | ||
| 72 | #[inline(always)] | ||
| 73 | pub fn tgt(&self) -> TGT_R { | ||
| 74 | TGT_R::new(((self.bits >> 8) & 0x01) != 0) | ||
| 75 | } | ||
| 76 | #[doc = "Bits 0:3 - DLC"] | ||
| 77 | #[inline(always)] | ||
| 78 | pub fn dlc(&self) -> DLC_R { | ||
| 79 | DLC_R::new((self.bits & 0x0f) as u8) | ||
| 80 | } | ||
| 81 | } | ||
| 82 | impl W { | ||
| 83 | #[doc = "Bits 16:31 - TIME"] | ||
| 84 | #[inline(always)] | ||
| 85 | pub fn time(&mut self) -> TIME_W { | ||
| 86 | TIME_W { w: self } | ||
| 87 | } | ||
| 88 | #[doc = "Bit 8 - TGT"] | ||
| 89 | #[inline(always)] | ||
| 90 | pub fn tgt(&mut self) -> TGT_W { | ||
| 91 | TGT_W { w: self } | ||
| 92 | } | ||
| 93 | #[doc = "Bits 0:3 - DLC"] | ||
| 94 | #[inline(always)] | ||
| 95 | pub fn dlc(&mut self) -> DLC_W { | ||
| 96 | DLC_W { w: self } | ||
| 97 | } | ||
| 98 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/can/tx/tir.rs b/embassy-stm32/src/can/bx/pac/can/tx/tir.rs deleted file mode 100644 index 2d2dd0ca7..000000000 --- a/embassy-stm32/src/can/bx/pac/can/tx/tir.rs +++ /dev/null | |||
| @@ -1,268 +0,0 @@ | |||
| 1 | #[doc = "Reader of register TIR"] | ||
| 2 | pub type R = crate::can::bx::R<u32, super::TIR>; | ||
| 3 | #[doc = "Writer for register TIR"] | ||
| 4 | pub type W = crate::can::bx::W<u32, super::TIR>; | ||
| 5 | #[doc = "Register TIR `reset()`'s with value 0"] | ||
| 6 | impl crate::can::bx::ResetValue for super::TIR { | ||
| 7 | type Type = u32; | ||
| 8 | #[inline(always)] | ||
| 9 | fn reset_value() -> Self::Type { | ||
| 10 | 0 | ||
| 11 | } | ||
| 12 | } | ||
| 13 | #[doc = "Reader of field `STID`"] | ||
| 14 | pub type STID_R = crate::can::bx::R<u16, u16>; | ||
| 15 | #[doc = "Write proxy for field `STID`"] | ||
| 16 | pub struct STID_W<'a> { | ||
| 17 | w: &'a mut W, | ||
| 18 | } | ||
| 19 | impl<'a> STID_W<'a> { | ||
| 20 | #[doc = r"Writes raw bits to the field"] | ||
| 21 | #[inline(always)] | ||
| 22 | pub unsafe fn bits(self, value: u16) -> &'a mut W { | ||
| 23 | self.w.bits = (self.w.bits & !(0x07ff << 21)) | (((value as u32) & 0x07ff) << 21); | ||
| 24 | self.w | ||
| 25 | } | ||
| 26 | } | ||
| 27 | #[doc = "Reader of field `EXID`"] | ||
| 28 | pub type EXID_R = crate::can::bx::R<u32, u32>; | ||
| 29 | #[doc = "Write proxy for field `EXID`"] | ||
| 30 | pub struct EXID_W<'a> { | ||
| 31 | w: &'a mut W, | ||
| 32 | } | ||
| 33 | impl<'a> EXID_W<'a> { | ||
| 34 | #[doc = r"Writes raw bits to the field"] | ||
| 35 | #[inline(always)] | ||
| 36 | pub unsafe fn bits(self, value: u32) -> &'a mut W { | ||
| 37 | self.w.bits = (self.w.bits & !(0x0003_ffff << 3)) | (((value as u32) & 0x0003_ffff) << 3); | ||
| 38 | self.w | ||
| 39 | } | ||
| 40 | } | ||
| 41 | #[doc = "IDE\n\nValue on reset: 0"] | ||
| 42 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 43 | pub enum IDE_A { | ||
| 44 | #[doc = "0: Standard identifier"] | ||
| 45 | STANDARD = 0, | ||
| 46 | #[doc = "1: Extended identifier"] | ||
| 47 | EXTENDED = 1, | ||
| 48 | } | ||
| 49 | impl From<IDE_A> for bool { | ||
| 50 | #[inline(always)] | ||
| 51 | fn from(variant: IDE_A) -> Self { | ||
| 52 | variant as u8 != 0 | ||
| 53 | } | ||
| 54 | } | ||
| 55 | #[doc = "Reader of field `IDE`"] | ||
| 56 | pub type IDE_R = crate::can::bx::R<bool, IDE_A>; | ||
| 57 | impl IDE_R { | ||
| 58 | #[doc = r"Get enumerated values variant"] | ||
| 59 | #[inline(always)] | ||
| 60 | pub fn variant(&self) -> IDE_A { | ||
| 61 | match self.bits { | ||
| 62 | false => IDE_A::STANDARD, | ||
| 63 | true => IDE_A::EXTENDED, | ||
| 64 | } | ||
| 65 | } | ||
| 66 | #[doc = "Checks if the value of the field is `STANDARD`"] | ||
| 67 | #[inline(always)] | ||
| 68 | pub fn is_standard(&self) -> bool { | ||
| 69 | *self == IDE_A::STANDARD | ||
| 70 | } | ||
| 71 | #[doc = "Checks if the value of the field is `EXTENDED`"] | ||
| 72 | #[inline(always)] | ||
| 73 | pub fn is_extended(&self) -> bool { | ||
| 74 | *self == IDE_A::EXTENDED | ||
| 75 | } | ||
| 76 | } | ||
| 77 | #[doc = "Write proxy for field `IDE`"] | ||
| 78 | pub struct IDE_W<'a> { | ||
| 79 | w: &'a mut W, | ||
| 80 | } | ||
| 81 | impl<'a> IDE_W<'a> { | ||
| 82 | #[doc = r"Writes `variant` to the field"] | ||
| 83 | #[inline(always)] | ||
| 84 | pub fn variant(self, variant: IDE_A) -> &'a mut W { | ||
| 85 | { | ||
| 86 | self.bit(variant.into()) | ||
| 87 | } | ||
| 88 | } | ||
| 89 | #[doc = "Standard identifier"] | ||
| 90 | #[inline(always)] | ||
| 91 | pub fn standard(self) -> &'a mut W { | ||
| 92 | self.variant(IDE_A::STANDARD) | ||
| 93 | } | ||
| 94 | #[doc = "Extended identifier"] | ||
| 95 | #[inline(always)] | ||
| 96 | pub fn extended(self) -> &'a mut W { | ||
| 97 | self.variant(IDE_A::EXTENDED) | ||
| 98 | } | ||
| 99 | #[doc = r"Sets the field bit"] | ||
| 100 | #[inline(always)] | ||
| 101 | pub fn set_bit(self) -> &'a mut W { | ||
| 102 | self.bit(true) | ||
| 103 | } | ||
| 104 | #[doc = r"Clears the field bit"] | ||
| 105 | #[inline(always)] | ||
| 106 | pub fn clear_bit(self) -> &'a mut W { | ||
| 107 | self.bit(false) | ||
| 108 | } | ||
| 109 | #[doc = r"Writes raw bits to the field"] | ||
| 110 | #[inline(always)] | ||
| 111 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 112 | self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); | ||
| 113 | self.w | ||
| 114 | } | ||
| 115 | } | ||
| 116 | #[doc = "RTR\n\nValue on reset: 0"] | ||
| 117 | #[derive(Clone, Copy, Debug, PartialEq)] | ||
| 118 | pub enum RTR_A { | ||
| 119 | #[doc = "0: Data frame"] | ||
| 120 | DATA = 0, | ||
| 121 | #[doc = "1: Remote frame"] | ||
| 122 | REMOTE = 1, | ||
| 123 | } | ||
| 124 | impl From<RTR_A> for bool { | ||
| 125 | #[inline(always)] | ||
| 126 | fn from(variant: RTR_A) -> Self { | ||
| 127 | variant as u8 != 0 | ||
| 128 | } | ||
| 129 | } | ||
| 130 | #[doc = "Reader of field `RTR`"] | ||
| 131 | pub type RTR_R = crate::can::bx::R<bool, RTR_A>; | ||
| 132 | impl RTR_R { | ||
| 133 | #[doc = r"Get enumerated values variant"] | ||
| 134 | #[inline(always)] | ||
| 135 | pub fn variant(&self) -> RTR_A { | ||
| 136 | match self.bits { | ||
| 137 | false => RTR_A::DATA, | ||
| 138 | true => RTR_A::REMOTE, | ||
| 139 | } | ||
| 140 | } | ||
| 141 | #[doc = "Checks if the value of the field is `DATA`"] | ||
| 142 | #[inline(always)] | ||
| 143 | pub fn is_data(&self) -> bool { | ||
| 144 | *self == RTR_A::DATA | ||
| 145 | } | ||
| 146 | #[doc = "Checks if the value of the field is `REMOTE`"] | ||
| 147 | #[inline(always)] | ||
| 148 | pub fn is_remote(&self) -> bool { | ||
| 149 | *self == RTR_A::REMOTE | ||
| 150 | } | ||
| 151 | } | ||
| 152 | #[doc = "Write proxy for field `RTR`"] | ||
| 153 | pub struct RTR_W<'a> { | ||
| 154 | w: &'a mut W, | ||
| 155 | } | ||
| 156 | impl<'a> RTR_W<'a> { | ||
| 157 | #[doc = r"Writes `variant` to the field"] | ||
| 158 | #[inline(always)] | ||
| 159 | pub fn variant(self, variant: RTR_A) -> &'a mut W { | ||
| 160 | { | ||
| 161 | self.bit(variant.into()) | ||
| 162 | } | ||
| 163 | } | ||
| 164 | #[doc = "Data frame"] | ||
| 165 | #[inline(always)] | ||
| 166 | pub fn data(self) -> &'a mut W { | ||
| 167 | self.variant(RTR_A::DATA) | ||
| 168 | } | ||
| 169 | #[doc = "Remote frame"] | ||
| 170 | #[inline(always)] | ||
| 171 | pub fn remote(self) -> &'a mut W { | ||
| 172 | self.variant(RTR_A::REMOTE) | ||
| 173 | } | ||
| 174 | #[doc = r"Sets the field bit"] | ||
| 175 | #[inline(always)] | ||
| 176 | pub fn set_bit(self) -> &'a mut W { | ||
| 177 | self.bit(true) | ||
| 178 | } | ||
| 179 | #[doc = r"Clears the field bit"] | ||
| 180 | #[inline(always)] | ||
| 181 | pub fn clear_bit(self) -> &'a mut W { | ||
| 182 | self.bit(false) | ||
| 183 | } | ||
| 184 | #[doc = r"Writes raw bits to the field"] | ||
| 185 | #[inline(always)] | ||
| 186 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 187 | self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); | ||
| 188 | self.w | ||
| 189 | } | ||
| 190 | } | ||
| 191 | #[doc = "Reader of field `TXRQ`"] | ||
| 192 | pub type TXRQ_R = crate::can::bx::R<bool, bool>; | ||
| 193 | #[doc = "Write proxy for field `TXRQ`"] | ||
| 194 | pub struct TXRQ_W<'a> { | ||
| 195 | w: &'a mut W, | ||
| 196 | } | ||
| 197 | impl<'a> TXRQ_W<'a> { | ||
| 198 | #[doc = r"Sets the field bit"] | ||
| 199 | #[inline(always)] | ||
| 200 | pub fn set_bit(self) -> &'a mut W { | ||
| 201 | self.bit(true) | ||
| 202 | } | ||
| 203 | #[doc = r"Clears the field bit"] | ||
| 204 | #[inline(always)] | ||
| 205 | pub fn clear_bit(self) -> &'a mut W { | ||
| 206 | self.bit(false) | ||
| 207 | } | ||
| 208 | #[doc = r"Writes raw bits to the field"] | ||
| 209 | #[inline(always)] | ||
| 210 | pub fn bit(self, value: bool) -> &'a mut W { | ||
| 211 | self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); | ||
| 212 | self.w | ||
| 213 | } | ||
| 214 | } | ||
| 215 | impl R { | ||
| 216 | #[doc = "Bits 21:31 - STID"] | ||
| 217 | #[inline(always)] | ||
| 218 | pub fn stid(&self) -> STID_R { | ||
| 219 | STID_R::new(((self.bits >> 21) & 0x07ff) as u16) | ||
| 220 | } | ||
| 221 | #[doc = "Bits 3:20 - EXID"] | ||
| 222 | #[inline(always)] | ||
| 223 | pub fn exid(&self) -> EXID_R { | ||
| 224 | EXID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) | ||
| 225 | } | ||
| 226 | #[doc = "Bit 2 - IDE"] | ||
| 227 | #[inline(always)] | ||
| 228 | pub fn ide(&self) -> IDE_R { | ||
| 229 | IDE_R::new(((self.bits >> 2) & 0x01) != 0) | ||
| 230 | } | ||
| 231 | #[doc = "Bit 1 - RTR"] | ||
| 232 | #[inline(always)] | ||
| 233 | pub fn rtr(&self) -> RTR_R { | ||
| 234 | RTR_R::new(((self.bits >> 1) & 0x01) != 0) | ||
| 235 | } | ||
| 236 | #[doc = "Bit 0 - TXRQ"] | ||
| 237 | #[inline(always)] | ||
| 238 | pub fn txrq(&self) -> TXRQ_R { | ||
| 239 | TXRQ_R::new((self.bits & 0x01) != 0) | ||
| 240 | } | ||
| 241 | } | ||
| 242 | impl W { | ||
| 243 | #[doc = "Bits 21:31 - STID"] | ||
| 244 | #[inline(always)] | ||
| 245 | pub fn stid(&mut self) -> STID_W { | ||
| 246 | STID_W { w: self } | ||
| 247 | } | ||
| 248 | #[doc = "Bits 3:20 - EXID"] | ||
| 249 | #[inline(always)] | ||
| 250 | pub fn exid(&mut self) -> EXID_W { | ||
| 251 | EXID_W { w: self } | ||
| 252 | } | ||
| 253 | #[doc = "Bit 2 - IDE"] | ||
| 254 | #[inline(always)] | ||
| 255 | pub fn ide(&mut self) -> IDE_W { | ||
| 256 | IDE_W { w: self } | ||
| 257 | } | ||
| 258 | #[doc = "Bit 1 - RTR"] | ||
| 259 | #[inline(always)] | ||
| 260 | pub fn rtr(&mut self) -> RTR_W { | ||
| 261 | RTR_W { w: self } | ||
| 262 | } | ||
| 263 | #[doc = "Bit 0 - TXRQ"] | ||
| 264 | #[inline(always)] | ||
| 265 | pub fn txrq(&mut self) -> TXRQ_W { | ||
| 266 | TXRQ_W { w: self } | ||
| 267 | } | ||
| 268 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/generic.rs b/embassy-stm32/src/can/bx/pac/generic.rs deleted file mode 100644 index 749e7e204..000000000 --- a/embassy-stm32/src/can/bx/pac/generic.rs +++ /dev/null | |||
| @@ -1,256 +0,0 @@ | |||
| 1 | use core::marker; | ||
| 2 | |||
| 3 | ///This trait shows that register has `read` method | ||
| 4 | /// | ||
| 5 | ///Registers marked with `Writable` can be also `modify`'ed | ||
| 6 | pub trait Readable {} | ||
| 7 | |||
| 8 | ///This trait shows that register has `write`, `write_with_zero` and `reset` method | ||
| 9 | /// | ||
| 10 | ///Registers marked with `Readable` can be also `modify`'ed | ||
| 11 | pub trait Writable {} | ||
| 12 | |||
| 13 | ///Reset value of the register | ||
| 14 | /// | ||
| 15 | ///This value is initial value for `write` method. | ||
| 16 | ///It can be also directly writed to register by `reset` method. | ||
| 17 | pub trait ResetValue { | ||
| 18 | ///Register size | ||
| 19 | type Type; | ||
| 20 | ///Reset value of the register | ||
| 21 | fn reset_value() -> Self::Type; | ||
| 22 | } | ||
| 23 | |||
| 24 | ///This structure provides volatile access to register | ||
| 25 | pub struct Reg<U, REG> { | ||
| 26 | register: vcell::VolatileCell<U>, | ||
| 27 | _marker: marker::PhantomData<REG>, | ||
| 28 | } | ||
| 29 | |||
| 30 | unsafe impl<U: Send, REG> Send for Reg<U, REG> {} | ||
| 31 | |||
| 32 | impl<U, REG> Reg<U, REG> | ||
| 33 | where | ||
| 34 | Self: Readable, | ||
| 35 | U: Copy, | ||
| 36 | { | ||
| 37 | ///Reads the contents of `Readable` register | ||
| 38 | /// | ||
| 39 | ///You can read the contents of a register in such way: | ||
| 40 | ///```ignore | ||
| 41 | ///let bits = periph.reg.read().bits(); | ||
| 42 | ///``` | ||
| 43 | ///or get the content of a particular field of a register. | ||
| 44 | ///```ignore | ||
| 45 | ///let reader = periph.reg.read(); | ||
| 46 | ///let bits = reader.field1().bits(); | ||
| 47 | ///let flag = reader.field2().bit_is_set(); | ||
| 48 | ///``` | ||
| 49 | #[inline(always)] | ||
| 50 | pub fn read(&self) -> R<U, Self> { | ||
| 51 | R { | ||
| 52 | bits: self.register.get(), | ||
| 53 | _reg: marker::PhantomData, | ||
| 54 | } | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | impl<U, REG> Reg<U, REG> | ||
| 59 | where | ||
| 60 | Self: ResetValue<Type = U> + Writable, | ||
| 61 | U: Copy, | ||
| 62 | { | ||
| 63 | ///Writes the reset value to `Writable` register | ||
| 64 | /// | ||
| 65 | ///Resets the register to its initial state | ||
| 66 | #[inline(always)] | ||
| 67 | pub fn reset(&self) { | ||
| 68 | self.register.set(Self::reset_value()) | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | impl<U, REG> Reg<U, REG> | ||
| 73 | where | ||
| 74 | Self: ResetValue<Type = U> + Writable, | ||
| 75 | U: Copy, | ||
| 76 | { | ||
| 77 | ///Writes bits to `Writable` register | ||
| 78 | /// | ||
| 79 | ///You can write raw bits into a register: | ||
| 80 | ///```ignore | ||
| 81 | ///periph.reg.write(|w| unsafe { w.bits(rawbits) }); | ||
| 82 | ///``` | ||
| 83 | ///or write only the fields you need: | ||
| 84 | ///```ignore | ||
| 85 | ///periph.reg.write(|w| w | ||
| 86 | /// .field1().bits(newfield1bits) | ||
| 87 | /// .field2().set_bit() | ||
| 88 | /// .field3().variant(VARIANT) | ||
| 89 | ///); | ||
| 90 | ///``` | ||
| 91 | ///Other fields will have reset value. | ||
| 92 | #[inline(always)] | ||
| 93 | pub fn write<F>(&self, f: F) | ||
| 94 | where | ||
| 95 | F: FnOnce(&mut W<U, Self>) -> &mut W<U, Self>, | ||
| 96 | { | ||
| 97 | self.register.set( | ||
| 98 | f(&mut W { | ||
| 99 | bits: Self::reset_value(), | ||
| 100 | _reg: marker::PhantomData, | ||
| 101 | }) | ||
| 102 | .bits, | ||
| 103 | ); | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | impl<U, REG> Reg<U, REG> | ||
| 108 | where | ||
| 109 | Self: Writable, | ||
| 110 | U: Copy + Default, | ||
| 111 | { | ||
| 112 | ///Writes Zero to `Writable` register | ||
| 113 | /// | ||
| 114 | ///Similar to `write`, but unused bits will contain 0. | ||
| 115 | #[inline(always)] | ||
| 116 | pub fn write_with_zero<F>(&self, f: F) | ||
| 117 | where | ||
| 118 | F: FnOnce(&mut W<U, Self>) -> &mut W<U, Self>, | ||
| 119 | { | ||
| 120 | self.register.set( | ||
| 121 | f(&mut W { | ||
| 122 | bits: U::default(), | ||
| 123 | _reg: marker::PhantomData, | ||
| 124 | }) | ||
| 125 | .bits, | ||
| 126 | ); | ||
| 127 | } | ||
| 128 | } | ||
| 129 | |||
| 130 | impl<U, REG> Reg<U, REG> | ||
| 131 | where | ||
| 132 | Self: Readable + Writable, | ||
| 133 | U: Copy, | ||
| 134 | { | ||
| 135 | ///Modifies the contents of the register | ||
| 136 | /// | ||
| 137 | ///E.g. to do a read-modify-write sequence to change parts of a register: | ||
| 138 | ///```ignore | ||
| 139 | ///periph.reg.modify(|r, w| unsafe { w.bits( | ||
| 140 | /// r.bits() | 3 | ||
| 141 | ///) }); | ||
| 142 | ///``` | ||
| 143 | ///or | ||
| 144 | ///```ignore | ||
| 145 | ///periph.reg.modify(|_, w| w | ||
| 146 | /// .field1().bits(newfield1bits) | ||
| 147 | /// .field2().set_bit() | ||
| 148 | /// .field3().variant(VARIANT) | ||
| 149 | ///); | ||
| 150 | ///``` | ||
| 151 | ///Other fields will have value they had before call `modify`. | ||
| 152 | #[inline(always)] | ||
| 153 | pub fn modify<F>(&self, f: F) | ||
| 154 | where | ||
| 155 | for<'w> F: FnOnce(&R<U, Self>, &'w mut W<U, Self>) -> &'w mut W<U, Self>, | ||
| 156 | { | ||
| 157 | let bits = self.register.get(); | ||
| 158 | self.register.set( | ||
| 159 | f( | ||
| 160 | &R { | ||
| 161 | bits, | ||
| 162 | _reg: marker::PhantomData, | ||
| 163 | }, | ||
| 164 | &mut W { | ||
| 165 | bits, | ||
| 166 | _reg: marker::PhantomData, | ||
| 167 | }, | ||
| 168 | ) | ||
| 169 | .bits, | ||
| 170 | ); | ||
| 171 | } | ||
| 172 | } | ||
| 173 | |||
| 174 | ///Register/field reader | ||
| 175 | /// | ||
| 176 | ///Result of the [`read`](Reg::read) method of a register. | ||
| 177 | ///Also it can be used in the [`modify`](Reg::read) method | ||
| 178 | pub struct R<U, T> { | ||
| 179 | pub(crate) bits: U, | ||
| 180 | _reg: marker::PhantomData<T>, | ||
| 181 | } | ||
| 182 | |||
| 183 | impl<U, T> R<U, T> | ||
| 184 | where | ||
| 185 | U: Copy, | ||
| 186 | { | ||
| 187 | ///Create new instance of reader | ||
| 188 | #[inline(always)] | ||
| 189 | pub(crate) fn new(bits: U) -> Self { | ||
| 190 | Self { | ||
| 191 | bits, | ||
| 192 | _reg: marker::PhantomData, | ||
| 193 | } | ||
| 194 | } | ||
| 195 | ///Read raw bits from register/field | ||
| 196 | #[inline(always)] | ||
| 197 | pub fn bits(&self) -> U { | ||
| 198 | self.bits | ||
| 199 | } | ||
| 200 | } | ||
| 201 | |||
| 202 | impl<U, T, FI> PartialEq<FI> for R<U, T> | ||
| 203 | where | ||
| 204 | U: PartialEq, | ||
| 205 | FI: Copy + Into<U>, | ||
| 206 | { | ||
| 207 | #[inline(always)] | ||
| 208 | fn eq(&self, other: &FI) -> bool { | ||
| 209 | self.bits.eq(&(*other).into()) | ||
| 210 | } | ||
| 211 | } | ||
| 212 | |||
| 213 | impl<FI> R<bool, FI> { | ||
| 214 | ///Value of the field as raw bits | ||
| 215 | #[inline(always)] | ||
| 216 | pub fn bit(&self) -> bool { | ||
| 217 | self.bits | ||
| 218 | } | ||
| 219 | ///Returns `true` if the bit is clear (0) | ||
| 220 | #[inline(always)] | ||
| 221 | pub fn bit_is_clear(&self) -> bool { | ||
| 222 | !self.bit() | ||
| 223 | } | ||
| 224 | ///Returns `true` if the bit is set (1) | ||
| 225 | #[inline(always)] | ||
| 226 | pub fn bit_is_set(&self) -> bool { | ||
| 227 | self.bit() | ||
| 228 | } | ||
| 229 | } | ||
| 230 | |||
| 231 | ///Register writer | ||
| 232 | /// | ||
| 233 | ///Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register | ||
| 234 | pub struct W<U, REG> { | ||
| 235 | ///Writable bits | ||
| 236 | pub(crate) bits: U, | ||
| 237 | _reg: marker::PhantomData<REG>, | ||
| 238 | } | ||
| 239 | |||
| 240 | impl<U, REG> W<U, REG> { | ||
| 241 | ///Writes raw bits to the register | ||
| 242 | #[inline(always)] | ||
| 243 | pub unsafe fn bits(&mut self, bits: U) -> &mut Self { | ||
| 244 | self.bits = bits; | ||
| 245 | self | ||
| 246 | } | ||
| 247 | } | ||
| 248 | |||
| 249 | ///Used if enumerated values cover not the whole range | ||
| 250 | #[derive(Clone, Copy, PartialEq)] | ||
| 251 | pub enum Variant<U, T> { | ||
| 252 | ///Expected variant | ||
| 253 | Val(T), | ||
| 254 | ///Raw bits | ||
| 255 | Res(U), | ||
| 256 | } | ||
diff --git a/embassy-stm32/src/can/bx/pac/mod.rs b/embassy-stm32/src/can/bx/pac/mod.rs deleted file mode 100644 index 4360c2c73..000000000 --- a/embassy-stm32/src/can/bx/pac/mod.rs +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #![allow(non_camel_case_types)] | ||
| 2 | #![allow(non_snake_case)] | ||
| 3 | #![allow(unused)] | ||
| 4 | use core::marker::PhantomData; | ||
| 5 | use core::ops::Deref; | ||
| 6 | |||
| 7 | #[doc = "Controller area network"] | ||
| 8 | pub mod can; | ||
| 9 | pub mod generic; | ||
