Skip to content

Commit

Permalink
Align TWAI command register field names for C6/H2 with other chips
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebraham committed Oct 22, 2024
1 parent 78d5232 commit 48fd400
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions esp32c6/src/twai0/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub type ABORT_TX_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RELEASE_BUF_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CLEAR_DATA_OVERRUN` writer - 1: clear, the data overrun status bit is cleared. 0: no action."]
pub type CLEAR_DATA_OVERRUN_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SELF_RX_REQUEST` writer - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
pub type SELF_RX_REQUEST_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SELF_RX_REQ` writer - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
pub type SELF_RX_REQ_W<'a, REG> = crate::BitWriter<'a, REG>;
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for crate::generic::Reg<CMD_SPEC> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
Expand Down Expand Up @@ -44,8 +44,8 @@ impl W {
#[doc = "Bit 4 - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
#[inline(always)]
#[must_use]
pub fn self_rx_request(&mut self) -> SELF_RX_REQUEST_W<CMD_SPEC> {
SELF_RX_REQUEST_W::new(self, 4)
pub fn self_rx_req(&mut self) -> SELF_RX_REQ_W<CMD_SPEC> {
SELF_RX_REQ_W::new(self, 4)
}
}
#[doc = "TWAI command register.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
Expand Down
6 changes: 6 additions & 0 deletions esp32c6/svd/patches/esp32c6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,9 @@ RSA:
CLEAR_INTERRUPT:
name: INT_CLR
access: read-write

TWAI*:
CMD:
_modify:
SELF_RX_REQUEST:
name: SELF_RX_REQ
8 changes: 4 additions & 4 deletions esp32h2/src/twai0/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub type ABORT_TX_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RELEASE_BUF_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CLEAR_DATA_OVERRUN` writer - 1: clear, the data overrun status bit is cleared. 0: no action."]
pub type CLEAR_DATA_OVERRUN_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SELF_RX_REQUEST` writer - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
pub type SELF_RX_REQUEST_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SELF_RX_REQ` writer - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
pub type SELF_RX_REQ_W<'a, REG> = crate::BitWriter<'a, REG>;
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for crate::generic::Reg<CMD_SPEC> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
Expand Down Expand Up @@ -44,8 +44,8 @@ impl W {
#[doc = "Bit 4 - 1: present, a message shall be transmitted and received simultaneously. 0: absent."]
#[inline(always)]
#[must_use]
pub fn self_rx_request(&mut self) -> SELF_RX_REQUEST_W<CMD_SPEC> {
SELF_RX_REQUEST_W::new(self, 4)
pub fn self_rx_req(&mut self) -> SELF_RX_REQ_W<CMD_SPEC> {
SELF_RX_REQ_W::new(self, 4)
}
}
#[doc = "TWAI command register.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
Expand Down
6 changes: 6 additions & 0 deletions esp32h2/svd/patches/esp32h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,9 @@ RSA:
CLEAR_INTERRUPT:
name: INT_CLR
access: read-write

TWAI*:
CMD:
_modify:
SELF_RX_REQUEST:
name: SELF_RX_REQ

0 comments on commit 48fd400

Please sign in to comment.