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

Correct bit width and offset for USB0:HCCHAR:EC field #308

Merged
merged 1 commit into from
Jan 6, 2025
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
6 changes: 6 additions & 0 deletions common_patches/usb0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,9 @@ _add:
bitWidth: 32
writeConstraint: [0, 0xffffffff]
access: read-write

"HCCHAR?":
_modify:
EC:
bitOffset: 20
bitWidth: 2
12 changes: 6 additions & 6 deletions esp32s2/src/usb0/hc/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub type EPTYPE_R = crate::FieldReader;
#[doc = "Field `EPTYPE` writer - "]
pub type EPTYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `EC` reader - "]
pub type EC_R = crate::BitReader;
pub type EC_R = crate::FieldReader;
#[doc = "Field `EC` writer - "]
pub type EC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `DEVADDR` reader - "]
pub type DEVADDR_R = crate::FieldReader;
#[doc = "Field `DEVADDR` writer - "]
Expand Down Expand Up @@ -68,10 +68,10 @@ impl R {
pub fn eptype(&self) -> EPTYPE_R {
EPTYPE_R::new(((self.bits >> 18) & 3) as u8)
}
#[doc = "Bit 21"]
#[doc = "Bits 20:21"]
#[inline(always)]
pub fn ec(&self) -> EC_R {
EC_R::new(((self.bits >> 21) & 1) != 0)
EC_R::new(((self.bits >> 20) & 3) as u8)
}
#[doc = "Bits 22:28"]
#[inline(always)]
Expand Down Expand Up @@ -137,10 +137,10 @@ impl W {
pub fn eptype(&mut self) -> EPTYPE_W<CHAR_SPEC> {
EPTYPE_W::new(self, 18)
}
#[doc = "Bit 21"]
#[doc = "Bits 20:21"]
#[inline(always)]
pub fn ec(&mut self) -> EC_W<CHAR_SPEC> {
EC_W::new(self, 21)
EC_W::new(self, 20)
}
#[doc = "Bits 22:28"]
#[inline(always)]
Expand Down
12 changes: 6 additions & 6 deletions esp32s3/src/usb0/hc/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub type EPTYPE_R = crate::FieldReader;
#[doc = "Field `EPTYPE` writer - "]
pub type EPTYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `EC` reader - "]
pub type EC_R = crate::BitReader;
pub type EC_R = crate::FieldReader;
#[doc = "Field `EC` writer - "]
pub type EC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `DEVADDR` reader - "]
pub type DEVADDR_R = crate::FieldReader;
#[doc = "Field `DEVADDR` writer - "]
Expand Down Expand Up @@ -68,10 +68,10 @@ impl R {
pub fn eptype(&self) -> EPTYPE_R {
EPTYPE_R::new(((self.bits >> 18) & 3) as u8)
}
#[doc = "Bit 21"]
#[doc = "Bits 20:21"]
#[inline(always)]
pub fn ec(&self) -> EC_R {
EC_R::new(((self.bits >> 21) & 1) != 0)
EC_R::new(((self.bits >> 20) & 3) as u8)
}
#[doc = "Bits 22:28"]
#[inline(always)]
Expand Down Expand Up @@ -137,10 +137,10 @@ impl W {
pub fn eptype(&mut self) -> EPTYPE_W<CHAR_SPEC> {
EPTYPE_W::new(self, 18)
}
#[doc = "Bit 21"]
#[doc = "Bits 20:21"]
#[inline(always)]
pub fn ec(&mut self) -> EC_W<CHAR_SPEC> {
EC_W::new(self, 21)
EC_W::new(self, 20)
}
#[doc = "Bits 22:28"]
#[inline(always)]
Expand Down
Loading