Skip to content

Commit

Permalink
lp-i2c
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajSadel committed Feb 2, 2024
1 parent 7607181 commit cf8c1bb
Show file tree
Hide file tree
Showing 66 changed files with 3,235 additions and 3,243 deletions.
2 changes: 1 addition & 1 deletion esp32c6-lp/src/lp_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pub mod fifo_st;
pub type FIFO_CONF = crate::Reg<fifo_conf::FIFO_CONF_SPEC>;
#[doc = "FIFO configuration register."]
pub mod fifo_conf;
#[doc = "DATA (r) register accessor: Rx FIFO read data.\n\nYou can [`read`](crate::generic::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::generic::Reg::read) this register and get [`data::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`data::W`]. You can also [`modify`](crate::generic::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<data::DATA_SPEC>;
#[doc = "Rx FIFO read data."]
pub mod data;
Expand Down
29 changes: 28 additions & 1 deletion esp32c6-lp/src/lp_i2c/data.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#[doc = "Register `DATA` reader"]
pub type R = crate::R<DATA_SPEC>;
#[doc = "Register `DATA` writer"]
pub type W = crate::W<DATA_SPEC>;
#[doc = "Field `FIFO_RDATA` reader - The value of rx FIFO read data."]
pub type FIFO_RDATA_R = crate::FieldReader;
#[doc = "Field `FIFO_RDATA` writer - The value of rx FIFO read data."]
pub type FIFO_RDATA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[doc = "Bits 0:7 - The value of rx FIFO read data."]
#[inline(always)]
Expand All @@ -23,13 +27,36 @@ impl core::fmt::Debug for crate::generic::Reg<DATA_SPEC> {
core::fmt::Debug::fmt(&self.read(), f)
}
}
#[doc = "Rx FIFO read data.\n\nYou can [`read`](crate::generic::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 - The value of rx FIFO read data."]
#[inline(always)]
#[must_use]
pub fn fifo_rdata(&mut self) -> FIFO_RDATA_W<DATA_SPEC> {
FIFO_RDATA_W::new(self, 0)
}
#[doc = r" Writes raw bits to the register."]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
}
#[doc = "Rx FIFO read data.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`data::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`data::W`](W). You can also [`modify`](crate::generic::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 {
const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets DATA to value 0"]
impl crate::Resettable for DATA_SPEC {
const RESET_VALUE: Self::Ux = 0;
Expand Down
6 changes: 6 additions & 0 deletions esp32c6-lp/svd/patches/esp32c6-lp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ LP_UART:
_modify:
RXFIFO_RD_BYTE:
access: read-write

LP_I2C:
DATA:
_modify:
FIFO_RDATA:
access: read-write
Loading

0 comments on commit cf8c1bb

Please sign in to comment.