Skip to content

Commit

Permalink
Correct field name for ESP32-C6 LP's LP_IO::GPIO%s registers
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebraham committed Nov 29, 2023
1 parent 774cab2 commit b0395bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 9 additions & 9 deletions esp32c6-lp/src/lp_io/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FUN_DRV_R = crate::FieldReader;
#[doc = "Field `FUN_DRV` writer - need des"]
pub type FUN_DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `MCU_SEL` reader - need des"]
pub type MCU_SEL_R = crate::FieldReader;
#[doc = "Field `MCU_SEL` writer - need des"]
pub type MCU_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
#[doc = "Field `FUN_SEL` reader - need des"]
pub type FUN_SEL_R = crate::FieldReader;
#[doc = "Field `FUN_SEL` writer - need des"]
pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[doc = "Bit 0 - need des"]
#[inline(always)]
Expand Down Expand Up @@ -99,8 +99,8 @@ impl R {
}
#[doc = "Bits 12:14 - need des"]
#[inline(always)]
pub fn mcu_sel(&self) -> MCU_SEL_R {
MCU_SEL_R::new(((self.bits >> 12) & 7) as u8)
pub fn fun_sel(&self) -> FUN_SEL_R {
FUN_SEL_R::new(((self.bits >> 12) & 7) as u8)
}
}
#[cfg(feature = "impl-register-debug")]
Expand All @@ -117,7 +117,7 @@ impl core::fmt::Debug for R {
.field("fun_wpu", &format_args!("{}", self.fun_wpu().bit()))
.field("fun_ie", &format_args!("{}", self.fun_ie().bit()))
.field("fun_drv", &format_args!("{}", self.fun_drv().bits()))
.field("mcu_sel", &format_args!("{}", self.mcu_sel().bits()))
.field("fun_sel", &format_args!("{}", self.fun_sel().bits()))
.finish()
}
}
Expand Down Expand Up @@ -191,8 +191,8 @@ impl W {
#[doc = "Bits 12:14 - need des"]
#[inline(always)]
#[must_use]
pub fn mcu_sel(&mut self) -> MCU_SEL_W<GPIO_SPEC> {
MCU_SEL_W::new(self, 12)
pub fn fun_sel(&mut self) -> FUN_SEL_W<GPIO_SPEC> {
FUN_SEL_W::new(self, 12)
}
#[doc = r" Writes raw bits to the register."]
#[doc = r""]
Expand Down
3 changes: 3 additions & 0 deletions esp32c6-lp/svd/patches/esp32c6-lp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ LP_IO:

GPIO0:
_strip: "LP_GPIO0_"
_modify:
MCU_SEL:
name: FUN_SEL
PIN0:
_strip: "LP_GPIO0_"

Expand Down

0 comments on commit b0395bd

Please sign in to comment.