Skip to content

Commit

Permalink
feat: updating from newer svd2rust (#86)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate <[email protected]>
  • Loading branch information
xmc-action-bot[bot] and renovate[bot] authored Dec 1, 2024
1 parent be75b54 commit 5c7a9f5
Show file tree
Hide file tree
Showing 731 changed files with 152 additions and 4,874 deletions.
2 changes: 0 additions & 2 deletions src/can/clc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ impl R {
impl W {
#[doc = "Bit 0 - Module Disable Request Bit"]
#[inline(always)]
#[must_use]
pub fn disr(&mut self) -> DISR_W<CLC_SPEC> {
DISR_W::new(self, 0)
}
#[doc = "Bit 3 - Sleep Mode Enable Control"]
#[inline(always)]
#[must_use]
pub fn edis(&mut self) -> EDIS_W<CLC_SPEC> {
EDIS_W::new(self, 3)
}
Expand Down
2 changes: 0 additions & 2 deletions src/can/fdr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ impl R {
impl W {
#[doc = "Bits 0:9 - Step Value"]
#[inline(always)]
#[must_use]
pub fn step(&mut self) -> STEP_W<FDR_SPEC> {
STEP_W::new(self, 0)
}
#[doc = "Bits 14:15 - Divider Mode"]
#[inline(always)]
#[must_use]
pub fn dm(&mut self) -> DM_W<FDR_SPEC> {
DM_W::new(self, 14)
}
Expand Down
2 changes: 0 additions & 2 deletions src/can/mcr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,11 @@ impl R {
impl W {
#[doc = "Bits 0:3 - Baud Rate Logic Clock Select"]
#[inline(always)]
#[must_use]
pub fn clksel(&mut self) -> CLKSEL_W<MCR_SPEC> {
CLKSEL_W::new(self, 0)
}
#[doc = "Bits 12:15 - Message Pending Selector"]
#[inline(always)]
#[must_use]
pub fn mpsel(&mut self) -> MPSEL_W<MCR_SPEC> {
MPSEL_W::new(self, 12)
}
Expand Down
1 change: 0 additions & 1 deletion src/can/mitr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub type IT_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl W {
#[doc = "Bits 0:7 - Interrupt Trigger"]
#[inline(always)]
#[must_use]
pub fn it(&mut self) -> IT_W<MITR_SPEC> {
IT_W::new(self, 0)
}
Expand Down
1 change: 0 additions & 1 deletion src/can/msimask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ impl R {
impl W {
#[doc = "Bits 0:31 - Message Index Mask"]
#[inline(always)]
#[must_use]
pub fn im(&mut self) -> IM_W<MSIMASK_SPEC> {
IM_W::new(self, 0)
}
Expand Down
1 change: 0 additions & 1 deletion src/can/mspnd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ impl R {
impl W {
#[doc = "Bits 0:31 - Message Pending"]
#[inline(always)]
#[must_use]
pub fn pnd(&mut self) -> PND_W<MSPND_SPEC> {
PND_W::new(self, 0)
}
Expand Down
3 changes: 0 additions & 3 deletions src/can/panctr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,16 @@ impl R {
impl W {
#[doc = "Bits 0:7 - Panel Command"]
#[inline(always)]
#[must_use]
pub fn pancmd(&mut self) -> PANCMD_W<PANCTR_SPEC> {
PANCMD_W::new(self, 0)
}
#[doc = "Bits 16:23 - Panel Argument 1"]
#[inline(always)]
#[must_use]
pub fn panar1(&mut self) -> PANAR1_W<PANCTR_SPEC> {
PANAR1_W::new(self, 16)
}
#[doc = "Bits 24:31 - Panel Argument 2"]
#[inline(always)]
#[must_use]
pub fn panar2(&mut self) -> PANAR2_W<PANCTR_SPEC> {
PANAR2_W::new(self, 24)
}
Expand Down
4 changes: 2 additions & 2 deletions src/can_mo/mo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ impl MO {
#[doc = "0x1c - Message Object Status Register"]
#[inline(always)]
pub const fn mostat(&self) -> &MOSTAT {
unsafe { &*(self as *const Self).cast::<u8>().add(28).cast() }
unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(28).cast() }
}
#[doc = "0x1c - Message Object Control Register"]
#[inline(always)]
pub const fn moctr(&self) -> &MOCTR {
unsafe { &*(self as *const Self).cast::<u8>().add(28).cast() }
unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(28).cast() }
}
}
#[doc = "MOFCR (rw) register accessor: Message Object Function Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`mofcr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mofcr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mofcr`]
Expand Down
2 changes: 0 additions & 2 deletions src/can_mo/mo/moamr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ impl R {
impl W {
#[doc = "Bits 0:28 - Acceptance Mask for Message Identifier"]
#[inline(always)]
#[must_use]
pub fn am(&mut self) -> AM_W<MOAMR_SPEC> {
AM_W::new(self, 0)
}
#[doc = "Bit 29 - Acceptance Mask Bit for Message IDE Bit"]
#[inline(always)]
#[must_use]
pub fn mide(&mut self) -> MIDE_W<MOAMR_SPEC> {
MIDE_W::new(self, 29)
}
Expand Down
9 changes: 3 additions & 6 deletions src/can_mo/mo/moar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ where
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum PRI_A {
#[doc = "1: Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL &amp; TXEN0 &amp; TXEN1 = 1) somewhere before this object in the list."]
#[doc = "1: Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL & TXEN0 & TXEN1 = 1) somewhere before this object in the list."]
VALUE2 = 1,
#[doc = "2: Transmit acceptance filtering is based on the CAN identifier. This means, message object n is considered for transmission only if there is no other message object with higher priority identifier + IDE + DIR (with respect to CAN arbitration rules) somewhere in the list (see )."]
VALUE3 = 2,
Expand Down Expand Up @@ -93,7 +93,7 @@ impl PRI_R {
_ => None,
}
}
#[doc = "Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL &amp; TXEN0 &amp; TXEN1 = 1) somewhere before this object in the list."]
#[doc = "Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL & TXEN0 & TXEN1 = 1) somewhere before this object in the list."]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PRI_A::VALUE2
Expand All @@ -116,7 +116,7 @@ where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[doc = "Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL &amp; TXEN0 &amp; TXEN1 = 1) somewhere before this object in the list."]
#[doc = "Transmit acceptance filtering is based on the list order. This means that message object n is considered for transmission only if there is no other message object with valid transmit request (MSGVAL & TXEN0 & TXEN1 = 1) somewhere before this object in the list."]
#[inline(always)]
pub fn value2(self) -> &'a mut crate::W<REG> {
self.variant(PRI_A::VALUE2)
Expand Down Expand Up @@ -152,19 +152,16 @@ impl R {
impl W {
#[doc = "Bits 0:28 - CAN Identifier of Message Object n"]
#[inline(always)]
#[must_use]
pub fn id(&mut self) -> ID_W<MOAR_SPEC> {
ID_W::new(self, 0)
}
#[doc = "Bit 29 - Identifier Extension Bit of Message Object n"]
#[inline(always)]
#[must_use]
pub fn ide(&mut self) -> IDE_W<MOAR_SPEC> {
IDE_W::new(self, 29)
}
#[doc = "Bits 30:31 - Priority Class"]
#[inline(always)]
#[must_use]
pub fn pri(&mut self) -> PRI_W<MOAR_SPEC> {
PRI_W::new(self, 30)
}
Expand Down
24 changes: 0 additions & 24 deletions src/can_mo/mo/moctr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,145 +51,121 @@ pub type SETDIR_W<'a, REG> = crate::BitWriter<'a, REG>;
impl W {
#[doc = "Bit 0 - Reset/Set Receive Pending"]
#[inline(always)]
#[must_use]
pub fn resrxpnd(&mut self) -> RESRXPND_W<MOCTR_SPEC> {
RESRXPND_W::new(self, 0)
}
#[doc = "Bit 1 - Reset/Set Transmit Pending"]
#[inline(always)]
#[must_use]
pub fn restxpnd(&mut self) -> RESTXPND_W<MOCTR_SPEC> {
RESTXPND_W::new(self, 1)
}
#[doc = "Bit 2 - Reset/Set Receive Updating"]
#[inline(always)]
#[must_use]
pub fn resrxupd(&mut self) -> RESRXUPD_W<MOCTR_SPEC> {
RESRXUPD_W::new(self, 2)
}
#[doc = "Bit 3 - Reset/Set New Data"]
#[inline(always)]
#[must_use]
pub fn resnewdat(&mut self) -> RESNEWDAT_W<MOCTR_SPEC> {
RESNEWDAT_W::new(self, 3)
}
#[doc = "Bit 4 - Reset/Set Message Lost"]
#[inline(always)]
#[must_use]
pub fn resmsglst(&mut self) -> RESMSGLST_W<MOCTR_SPEC> {
RESMSGLST_W::new(self, 4)
}
#[doc = "Bit 5 - Reset/Set Message Valid"]
#[inline(always)]
#[must_use]
pub fn resmsgval(&mut self) -> RESMSGVAL_W<MOCTR_SPEC> {
RESMSGVAL_W::new(self, 5)
}
#[doc = "Bit 6 - Reset/Set Receive/Transmit Selected"]
#[inline(always)]
#[must_use]
pub fn resrtsel(&mut self) -> RESRTSEL_W<MOCTR_SPEC> {
RESRTSEL_W::new(self, 6)
}
#[doc = "Bit 7 - Reset/Set Receive Enable"]
#[inline(always)]
#[must_use]
pub fn resrxen(&mut self) -> RESRXEN_W<MOCTR_SPEC> {
RESRXEN_W::new(self, 7)
}
#[doc = "Bit 8 - Reset/Set Transmit Request"]
#[inline(always)]
#[must_use]
pub fn restxrq(&mut self) -> RESTXRQ_W<MOCTR_SPEC> {
RESTXRQ_W::new(self, 8)
}
#[doc = "Bit 9 - Reset/Set Transmit Enable 0"]
#[inline(always)]
#[must_use]
pub fn restxen0(&mut self) -> RESTXEN0_W<MOCTR_SPEC> {
RESTXEN0_W::new(self, 9)
}
#[doc = "Bit 10 - Reset/Set Transmit Enable 1"]
#[inline(always)]
#[must_use]
pub fn restxen1(&mut self) -> RESTXEN1_W<MOCTR_SPEC> {
RESTXEN1_W::new(self, 10)
}
#[doc = "Bit 11 - Reset/Set Message Direction"]
#[inline(always)]
#[must_use]
pub fn resdir(&mut self) -> RESDIR_W<MOCTR_SPEC> {
RESDIR_W::new(self, 11)
}
#[doc = "Bit 16 - Reset/Set Receive Pending"]
#[inline(always)]
#[must_use]
pub fn setrxpnd(&mut self) -> SETRXPND_W<MOCTR_SPEC> {
SETRXPND_W::new(self, 16)
}
#[doc = "Bit 17 - Reset/Set Transmit Pending"]
#[inline(always)]
#[must_use]
pub fn settxpnd(&mut self) -> SETTXPND_W<MOCTR_SPEC> {
SETTXPND_W::new(self, 17)
}
#[doc = "Bit 18 - Reset/Set Receive Updating"]
#[inline(always)]
#[must_use]
pub fn setrxupd(&mut self) -> SETRXUPD_W<MOCTR_SPEC> {
SETRXUPD_W::new(self, 18)
}
#[doc = "Bit 19 - Reset/Set New Data"]
#[inline(always)]
#[must_use]
pub fn setnewdat(&mut self) -> SETNEWDAT_W<MOCTR_SPEC> {
SETNEWDAT_W::new(self, 19)
}
#[doc = "Bit 20 - Reset/Set Message Lost"]
#[inline(always)]
#[must_use]
pub fn setmsglst(&mut self) -> SETMSGLST_W<MOCTR_SPEC> {
SETMSGLST_W::new(self, 20)
}
#[doc = "Bit 21 - Reset/Set Message Valid"]
#[inline(always)]
#[must_use]
pub fn setmsgval(&mut self) -> SETMSGVAL_W<MOCTR_SPEC> {
SETMSGVAL_W::new(self, 21)
}
#[doc = "Bit 22 - Reset/Set Receive/Transmit Selected"]
#[inline(always)]
#[must_use]
pub fn setrtsel(&mut self) -> SETRTSEL_W<MOCTR_SPEC> {
SETRTSEL_W::new(self, 22)
}
#[doc = "Bit 23 - Reset/Set Receive Enable"]
#[inline(always)]
#[must_use]
pub fn setrxen(&mut self) -> SETRXEN_W<MOCTR_SPEC> {
SETRXEN_W::new(self, 23)
}
#[doc = "Bit 24 - Reset/Set Transmit Request"]
#[inline(always)]
#[must_use]
pub fn settxrq(&mut self) -> SETTXRQ_W<MOCTR_SPEC> {
SETTXRQ_W::new(self, 24)
}
#[doc = "Bit 25 - Reset/Set Transmit Enable 0"]
#[inline(always)]
#[must_use]
pub fn settxen0(&mut self) -> SETTXEN0_W<MOCTR_SPEC> {
SETTXEN0_W::new(self, 25)
}
#[doc = "Bit 26 - Reset/Set Transmit Enable 1"]
#[inline(always)]
#[must_use]
pub fn settxen1(&mut self) -> SETTXEN1_W<MOCTR_SPEC> {
SETTXEN1_W::new(self, 26)
}
#[doc = "Bit 27 - Reset/Set Message Direction"]
#[inline(always)]
#[must_use]
pub fn setdir(&mut self) -> SETDIR_W<MOCTR_SPEC> {
SETDIR_W::new(self, 27)
}
Expand Down
4 changes: 0 additions & 4 deletions src/can_mo/mo/modatah.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,21 @@ impl R {
impl W {
#[doc = "Bits 0:7 - Data Byte 4 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db4(&mut self) -> DB4_W<MODATAH_SPEC> {
DB4_W::new(self, 0)
}
#[doc = "Bits 8:15 - Data Byte 5 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db5(&mut self) -> DB5_W<MODATAH_SPEC> {
DB5_W::new(self, 8)
}
#[doc = "Bits 16:23 - Data Byte 6 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db6(&mut self) -> DB6_W<MODATAH_SPEC> {
DB6_W::new(self, 16)
}
#[doc = "Bits 24:31 - Data Byte 7 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db7(&mut self) -> DB7_W<MODATAH_SPEC> {
DB7_W::new(self, 24)
}
Expand Down
4 changes: 0 additions & 4 deletions src/can_mo/mo/modatal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,21 @@ impl R {
impl W {
#[doc = "Bits 0:7 - Data Byte 0 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db0(&mut self) -> DB0_W<MODATAL_SPEC> {
DB0_W::new(self, 0)
}
#[doc = "Bits 8:15 - Data Byte 1 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db1(&mut self) -> DB1_W<MODATAL_SPEC> {
DB1_W::new(self, 8)
}
#[doc = "Bits 16:23 - Data Byte 2 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db2(&mut self) -> DB2_W<MODATAL_SPEC> {
DB2_W::new(self, 16)
}
#[doc = "Bits 24:31 - Data Byte 3 of Message Object n"]
#[inline(always)]
#[must_use]
pub fn db3(&mut self) -> DB3_W<MODATAL_SPEC> {
DB3_W::new(self, 24)
}
Expand Down
Loading

0 comments on commit 5c7a9f5

Please sign in to comment.