Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align TWAI register field for ESP32-C6/H2 #289

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions esp32c6/src/twai0/err_code_cap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pub type R = crate::R<ERR_CODE_CAP_SPEC>;
#[doc = "Field `ERR_CAPTURE_CODE_SEGMENT` reader - This register contains information about the location of errors on the bus."]
pub type ERR_CAPTURE_CODE_SEGMENT_R = crate::FieldReader;
#[doc = "Field `ERR_CAPTURE_CODE_DIRECTION` reader - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
pub type ERR_CAPTURE_CODE_DIRECTION_R = crate::BitReader;
#[doc = "Field `ECC_DIRECTION` reader - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
pub type ECC_DIRECTION_R = crate::BitReader;
#[doc = "Field `ERR_CAPTURE_CODE_TYPE` reader - 00: bit error. 01: form error. 10:stuff error. 11:other type of error."]
pub type ERR_CAPTURE_CODE_TYPE_R = crate::FieldReader;
impl R {
Expand All @@ -14,8 +14,8 @@ impl R {
}
#[doc = "Bit 5 - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
#[inline(always)]
pub fn err_capture_code_direction(&self) -> ERR_CAPTURE_CODE_DIRECTION_R {
ERR_CAPTURE_CODE_DIRECTION_R::new(((self.bits >> 5) & 1) != 0)
pub fn ecc_direction(&self) -> ECC_DIRECTION_R {
ECC_DIRECTION_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bits 6:7 - 00: bit error. 01: form error. 10:stuff error. 11:other type of error."]
#[inline(always)]
Expand All @@ -28,10 +28,7 @@ impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ERR_CODE_CAP")
.field("err_capture_code_segment", &self.err_capture_code_segment())
.field(
"err_capture_code_direction",
&self.err_capture_code_direction(),
)
.field("ecc_direction", &self.ecc_direction())
.field("err_capture_code_type", &self.err_capture_code_type())
.finish()
}
Expand Down
5 changes: 5 additions & 0 deletions esp32c6/svd/patches/esp32c6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,8 @@ TWAI*:
_modify:
SELF_RX_REQUEST:
name: SELF_RX_REQ

ERR_CODE_CAP:
_modify:
ERR_CAPTURE_CODE_DIRECTION:
name: ECC_DIRECTION
13 changes: 5 additions & 8 deletions esp32h2/src/twai0/err_code_cap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pub type R = crate::R<ERR_CODE_CAP_SPEC>;
#[doc = "Field `ERR_CAPTURE_CODE_SEGMENT` reader - This register contains information about the location of errors on the bus."]
pub type ERR_CAPTURE_CODE_SEGMENT_R = crate::FieldReader;
#[doc = "Field `ERR_CAPTURE_CODE_DIRECTION` reader - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
pub type ERR_CAPTURE_CODE_DIRECTION_R = crate::BitReader;
#[doc = "Field `ECC_DIRECTION` reader - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
pub type ECC_DIRECTION_R = crate::BitReader;
#[doc = "Field `ERR_CAPTURE_CODE_TYPE` reader - 00: bit error. 01: form error. 10:stuff error. 11:other type of error."]
pub type ERR_CAPTURE_CODE_TYPE_R = crate::FieldReader;
impl R {
Expand All @@ -14,8 +14,8 @@ impl R {
}
#[doc = "Bit 5 - 1: RX, error occurred during reception. 0: TX, error occurred during transmission."]
#[inline(always)]
pub fn err_capture_code_direction(&self) -> ERR_CAPTURE_CODE_DIRECTION_R {
ERR_CAPTURE_CODE_DIRECTION_R::new(((self.bits >> 5) & 1) != 0)
pub fn ecc_direction(&self) -> ECC_DIRECTION_R {
ECC_DIRECTION_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bits 6:7 - 00: bit error. 01: form error. 10:stuff error. 11:other type of error."]
#[inline(always)]
Expand All @@ -28,10 +28,7 @@ impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ERR_CODE_CAP")
.field("err_capture_code_segment", &self.err_capture_code_segment())
.field(
"err_capture_code_direction",
&self.err_capture_code_direction(),
)
.field("ecc_direction", &self.ecc_direction())
.field("err_capture_code_type", &self.err_capture_code_type())
.finish()
}
Expand Down
5 changes: 5 additions & 0 deletions esp32h2/svd/patches/esp32h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,8 @@ TWAI*:
_modify:
SELF_RX_REQUEST:
name: SELF_RX_REQ

ERR_CODE_CAP:
_modify:
ERR_CAPTURE_CODE_DIRECTION:
name: ECC_DIRECTION