diff --git a/esp32p4/src/i2c0.rs b/esp32p4/src/i2c0.rs index aafd8fb3ab..5d326ce472 100644 --- a/esp32p4/src/i2c0.rs +++ b/esp32p4/src/i2c0.rs @@ -217,7 +217,7 @@ pub mod fifo_st; pub type FIFO_CONF = crate::Reg; #[doc = "FIFO configuration register"] pub mod fifo_conf; -#[doc = "DATA (r) register accessor: Rx FIFO read data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@data`] module"] +#[doc = "DATA (rw) register accessor: Rx FIFO read data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`data::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@data`] module"] pub type DATA = crate::Reg; #[doc = "Rx FIFO read data"] pub mod data; diff --git a/esp32p4/src/i2c0/data.rs b/esp32p4/src/i2c0/data.rs index 0c101a90b9..521cdd40c8 100644 --- a/esp32p4/src/i2c0/data.rs +++ b/esp32p4/src/i2c0/data.rs @@ -1,7 +1,11 @@ #[doc = "Register `DATA` reader"] pub type R = crate::R; +#[doc = "Register `DATA` writer"] +pub type W = crate::W; #[doc = "Field `FIFO_RDATA` reader - Represents the value of RXFIFO read data."] pub type FIFO_RDATA_R = crate::FieldReader; +#[doc = "Field `FIFO_RDATA` writer - Represents the value of RXFIFO read data."] +pub type FIFO_RDATA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>; impl R { #[doc = "Bits 0:7 - Represents the value of RXFIFO read data."] #[inline(always)] @@ -17,12 +21,23 @@ impl core::fmt::Debug for R { .finish() } } -#[doc = "Rx FIFO read data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +impl W { + #[doc = "Bits 0:7 - Represents the value of RXFIFO read data."] + #[inline(always)] + pub fn fifo_rdata(&mut self) -> FIFO_RDATA_W<'_, DATA_SPEC> { + FIFO_RDATA_W::new(self, 0) + } +} +#[doc = "Rx FIFO read data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`data::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct DATA_SPEC; impl crate::RegisterSpec for DATA_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`data::R`](R) reader structure"] impl crate::Readable for DATA_SPEC {} +#[doc = "`write(|w| ..)` method takes [`data::W`](W) writer structure"] +impl crate::Writable for DATA_SPEC { + type Safety = crate::Unsafe; +} #[doc = "`reset()` method sets DATA to value 0"] impl crate::Resettable for DATA_SPEC {} diff --git a/esp32p4/svd/patches/esp32p4.yaml b/esp32p4/svd/patches/esp32p4.yaml index 3a44c79ab0..d6c319e1fb 100644 --- a/esp32p4/svd/patches/esp32p4.yaml +++ b/esp32p4/svd/patches/esp32p4.yaml @@ -86,6 +86,10 @@ I2C0: _modify: INT_STATUS: name: INT_ST + DATA: + _modify: + FIFO_RDATA: + access: read-write _include: - ../../../common_patches/i2c_force_out.yaml - ../../../common_patches/int_strip.yaml