esp32s3_ulp/
rtc_i2c.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    scl_low: SCL_LOW,
6    ctrl: CTRL,
7    status: STATUS,
8    to: TO,
9    slave_addr: SLAVE_ADDR,
10    scl_high: SCL_HIGH,
11    sda_duty: SDA_DUTY,
12    scl_start_period: SCL_START_PERIOD,
13    scl_stop_period: SCL_STOP_PERIOD,
14    int_clr: INT_CLR,
15    int_raw: INT_RAW,
16    int_st: INT_ST,
17    int_ena: INT_ENA,
18    data: DATA,
19    cmd: [CMD; 16],
20    _reserved15: [u8; 0x84],
21    date: DATE,
22}
23impl RegisterBlock {
24    #[doc = "0x00 - configure low scl period"]
25    #[inline(always)]
26    pub const fn scl_low(&self) -> &SCL_LOW {
27        &self.scl_low
28    }
29    #[doc = "0x04 - configure i2c ctrl"]
30    #[inline(always)]
31    pub const fn ctrl(&self) -> &CTRL {
32        &self.ctrl
33    }
34    #[doc = "0x08 - get i2c status"]
35    #[inline(always)]
36    pub const fn status(&self) -> &STATUS {
37        &self.status
38    }
39    #[doc = "0x0c - configure time out"]
40    #[inline(always)]
41    pub const fn to(&self) -> &TO {
42        &self.to
43    }
44    #[doc = "0x10 - configure slave id"]
45    #[inline(always)]
46    pub const fn slave_addr(&self) -> &SLAVE_ADDR {
47        &self.slave_addr
48    }
49    #[doc = "0x14 - configure high scl period"]
50    #[inline(always)]
51    pub const fn scl_high(&self) -> &SCL_HIGH {
52        &self.scl_high
53    }
54    #[doc = "0x18 - configure sda duty"]
55    #[inline(always)]
56    pub const fn sda_duty(&self) -> &SDA_DUTY {
57        &self.sda_duty
58    }
59    #[doc = "0x1c - configure scl start period"]
60    #[inline(always)]
61    pub const fn scl_start_period(&self) -> &SCL_START_PERIOD {
62        &self.scl_start_period
63    }
64    #[doc = "0x20 - configure scl stop period"]
65    #[inline(always)]
66    pub const fn scl_stop_period(&self) -> &SCL_STOP_PERIOD {
67        &self.scl_stop_period
68    }
69    #[doc = "0x24 - interrupt clear register"]
70    #[inline(always)]
71    pub const fn int_clr(&self) -> &INT_CLR {
72        &self.int_clr
73    }
74    #[doc = "0x28 - interrupt raw register"]
75    #[inline(always)]
76    pub const fn int_raw(&self) -> &INT_RAW {
77        &self.int_raw
78    }
79    #[doc = "0x2c - interrupt state register"]
80    #[inline(always)]
81    pub const fn int_st(&self) -> &INT_ST {
82        &self.int_st
83    }
84    #[doc = "0x30 - interrupt enable register"]
85    #[inline(always)]
86    pub const fn int_ena(&self) -> &INT_ENA {
87        &self.int_ena
88    }
89    #[doc = "0x34 - get i2c data status"]
90    #[inline(always)]
91    pub const fn data(&self) -> &DATA {
92        &self.data
93    }
94    #[doc = "0x38..0x78 - I2C command%s register"]
95    #[inline(always)]
96    pub const fn cmd(&self, n: usize) -> &CMD {
97        &self.cmd[n]
98    }
99    #[doc = "Iterator for array of:"]
100    #[doc = "0x38..0x78 - I2C command%s register"]
101    #[inline(always)]
102    pub fn cmd_iter(&self) -> impl Iterator<Item = &CMD> {
103        self.cmd.iter()
104    }
105    #[doc = "0xfc - version register"]
106    #[inline(always)]
107    pub const fn date(&self) -> &DATE {
108        &self.date
109    }
110}
111#[doc = "SCL_LOW (rw) register accessor: configure low scl period\n\nYou can [`read`](crate::Reg::read) this register and get [`scl_low::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scl_low::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@scl_low`] module"]
112pub type SCL_LOW = crate::Reg<scl_low::SCL_LOW_SPEC>;
113#[doc = "configure low scl period"]
114pub mod scl_low;
115#[doc = "CTRL (rw) register accessor: configure i2c ctrl\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::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@ctrl`] module"]
116pub type CTRL = crate::Reg<ctrl::CTRL_SPEC>;
117#[doc = "configure i2c ctrl"]
118pub mod ctrl;
119#[doc = "STATUS (r) register accessor: get i2c status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status`] module"]
120pub type STATUS = crate::Reg<status::STATUS_SPEC>;
121#[doc = "get i2c status"]
122pub mod status;
123#[doc = "TO (rw) register accessor: configure time out\n\nYou can [`read`](crate::Reg::read) this register and get [`to::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`to::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@to`] module"]
124pub type TO = crate::Reg<to::TO_SPEC>;
125#[doc = "configure time out"]
126pub mod to;
127#[doc = "SLAVE_ADDR (rw) register accessor: configure slave id\n\nYou can [`read`](crate::Reg::read) this register and get [`slave_addr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`slave_addr::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@slave_addr`] module"]
128pub type SLAVE_ADDR = crate::Reg<slave_addr::SLAVE_ADDR_SPEC>;
129#[doc = "configure slave id"]
130pub mod slave_addr;
131#[doc = "SCL_HIGH (rw) register accessor: configure high scl period\n\nYou can [`read`](crate::Reg::read) this register and get [`scl_high::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scl_high::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@scl_high`] module"]
132pub type SCL_HIGH = crate::Reg<scl_high::SCL_HIGH_SPEC>;
133#[doc = "configure high scl period"]
134pub mod scl_high;
135#[doc = "SDA_DUTY (rw) register accessor: configure sda duty\n\nYou can [`read`](crate::Reg::read) this register and get [`sda_duty::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sda_duty::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@sda_duty`] module"]
136pub type SDA_DUTY = crate::Reg<sda_duty::SDA_DUTY_SPEC>;
137#[doc = "configure sda duty"]
138pub mod sda_duty;
139#[doc = "SCL_START_PERIOD (rw) register accessor: configure scl start period\n\nYou can [`read`](crate::Reg::read) this register and get [`scl_start_period::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scl_start_period::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@scl_start_period`] module"]
140pub type SCL_START_PERIOD = crate::Reg<scl_start_period::SCL_START_PERIOD_SPEC>;
141#[doc = "configure scl start period"]
142pub mod scl_start_period;
143#[doc = "SCL_STOP_PERIOD (rw) register accessor: configure scl stop period\n\nYou can [`read`](crate::Reg::read) this register and get [`scl_stop_period::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scl_stop_period::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@scl_stop_period`] module"]
144pub type SCL_STOP_PERIOD = crate::Reg<scl_stop_period::SCL_STOP_PERIOD_SPEC>;
145#[doc = "configure scl stop period"]
146pub mod scl_stop_period;
147#[doc = "INT_CLR (w) register accessor: interrupt clear register\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_clr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_clr`] module"]
148pub type INT_CLR = crate::Reg<int_clr::INT_CLR_SPEC>;
149#[doc = "interrupt clear register"]
150pub mod int_clr;
151#[doc = "INT_RAW (r) register accessor: interrupt raw register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_raw::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_raw`] module"]
152pub type INT_RAW = crate::Reg<int_raw::INT_RAW_SPEC>;
153#[doc = "interrupt raw register"]
154pub mod int_raw;
155#[doc = "INT_ST (r) register accessor: interrupt state register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_st`] module"]
156pub type INT_ST = crate::Reg<int_st::INT_ST_SPEC>;
157#[doc = "interrupt state register"]
158pub mod int_st;
159#[doc = "INT_ENA (rw) register accessor: interrupt enable register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::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@int_ena`] module"]
160pub type INT_ENA = crate::Reg<int_ena::INT_ENA_SPEC>;
161#[doc = "interrupt enable register"]
162pub mod int_ena;
163#[doc = "DATA (rw) register accessor: get i2c data status\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"]
164pub type DATA = crate::Reg<data::DATA_SPEC>;
165#[doc = "get i2c data status"]
166pub mod data;
167#[doc = "CMD (rw) register accessor: I2C command%s register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmd::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::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@cmd`] module"]
168pub type CMD = crate::Reg<cmd::CMD_SPEC>;
169#[doc = "I2C command%s register"]
170pub mod cmd;
171#[doc = "DATE (rw) register accessor: version register\n\nYou can [`read`](crate::Reg::read) this register and get [`date::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`date::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@date`] module"]
172pub type DATE = crate::Reg<date::DATE_SPEC>;
173#[doc = "version register"]
174pub mod date;