esp32s2/
ds.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#[repr(C)]
#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
#[doc = "Register block"]
pub struct RegisterBlock {
    c_mem: [C_MEM; 396],
    iv_: [IV_; 4],
    _reserved2: [u8; 0x01c0],
    x_mem: [X_MEM; 128],
    z_mem: [Z_MEM; 128],
    _reserved4: [u8; 0x0200],
    set_start: SET_START,
    set_me: SET_ME,
    set_finish: SET_FINISH,
    query_busy: QUERY_BUSY,
    query_key_wrong: QUERY_KEY_WRONG,
    query_check: QUERY_CHECK,
    _reserved10: [u8; 0x08],
    date: DATE,
}
impl RegisterBlock {
    #[doc = "0x00..0x630 - memory C"]
    #[inline(always)]
    pub const fn c_mem(&self, n: usize) -> &C_MEM {
        &self.c_mem[n]
    }
    #[doc = "Iterator for array of:"]
    #[doc = "0x00..0x630 - memory C"]
    #[inline(always)]
    pub fn c_mem_iter(&self) -> impl Iterator<Item = &C_MEM> {
        self.c_mem.iter()
    }
    #[doc = "0x630..0x640 - IV block data."]
    #[inline(always)]
    pub const fn iv_(&self, n: usize) -> &IV_ {
        &self.iv_[n]
    }
    #[doc = "Iterator for array of:"]
    #[doc = "0x630..0x640 - IV block data."]
    #[inline(always)]
    pub fn iv__iter(&self) -> impl Iterator<Item = &IV_> {
        self.iv_.iter()
    }
    #[doc = "0x800..0xa00 - memory X"]
    #[inline(always)]
    pub const fn x_mem(&self, n: usize) -> &X_MEM {
        &self.x_mem[n]
    }
    #[doc = "Iterator for array of:"]
    #[doc = "0x800..0xa00 - memory X"]
    #[inline(always)]
    pub fn x_mem_iter(&self) -> impl Iterator<Item = &X_MEM> {
        self.x_mem.iter()
    }
    #[doc = "0xa00..0xc00 - memory Z"]
    #[inline(always)]
    pub const fn z_mem(&self, n: usize) -> &Z_MEM {
        &self.z_mem[n]
    }
    #[doc = "Iterator for array of:"]
    #[doc = "0xa00..0xc00 - memory Z"]
    #[inline(always)]
    pub fn z_mem_iter(&self) -> impl Iterator<Item = &Z_MEM> {
        self.z_mem.iter()
    }
    #[doc = "0xe00 - Activates the DS peripheral"]
    #[inline(always)]
    pub const fn set_start(&self) -> &SET_START {
        &self.set_start
    }
    #[doc = "0xe04 - Starts DS operation"]
    #[inline(always)]
    pub const fn set_me(&self) -> &SET_ME {
        &self.set_me
    }
    #[doc = "0xe08 - Ends DS operation"]
    #[inline(always)]
    pub const fn set_finish(&self) -> &SET_FINISH {
        &self.set_finish
    }
    #[doc = "0xe0c - Status of the DS"]
    #[inline(always)]
    pub const fn query_busy(&self) -> &QUERY_BUSY {
        &self.query_busy
    }
    #[doc = "0xe10 - Checks the reason why DS_KEY is not ready."]
    #[inline(always)]
    pub const fn query_key_wrong(&self) -> &QUERY_KEY_WRONG {
        &self.query_key_wrong
    }
    #[doc = "0xe14 - Queries DS check result"]
    #[inline(always)]
    pub const fn query_check(&self) -> &QUERY_CHECK {
        &self.query_check
    }
    #[doc = "0xe20 - Version control register"]
    #[inline(always)]
    pub const fn date(&self) -> &DATE {
        &self.date
    }
}
#[doc = "C_MEM (rw) register accessor: memory C\n\nYou can [`read`](crate::Reg::read) this register and get [`c_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`c_mem::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@c_mem`] module"]
pub type C_MEM = crate::Reg<c_mem::C_MEM_SPEC>;
#[doc = "memory C"]
pub mod c_mem;
#[doc = "IV_ (w) register accessor: IV block data.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`iv_::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@iv_`] module"]
pub type IV_ = crate::Reg<iv_::IV__SPEC>;
#[doc = "IV block data."]
pub mod iv_;
#[doc = "X_MEM (rw) register accessor: memory X\n\nYou can [`read`](crate::Reg::read) this register and get [`x_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`x_mem::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@x_mem`] module"]
pub type X_MEM = crate::Reg<x_mem::X_MEM_SPEC>;
#[doc = "memory X"]
pub mod x_mem;
#[doc = "Z_MEM (rw) register accessor: memory Z\n\nYou can [`read`](crate::Reg::read) this register and get [`z_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`z_mem::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@z_mem`] module"]
pub type Z_MEM = crate::Reg<z_mem::Z_MEM_SPEC>;
#[doc = "memory Z"]
pub mod z_mem;
#[doc = "SET_START (w) register accessor: Activates the DS peripheral\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_start`] module"]
pub type SET_START = crate::Reg<set_start::SET_START_SPEC>;
#[doc = "Activates the DS peripheral"]
pub mod set_start;
#[doc = "SET_ME (w) register accessor: Starts DS operation\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_me::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_me`] module"]
pub type SET_ME = crate::Reg<set_me::SET_ME_SPEC>;
#[doc = "Starts DS operation"]
pub mod set_me;
#[doc = "SET_FINISH (w) register accessor: Ends DS operation\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_finish::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_finish`] module"]
pub type SET_FINISH = crate::Reg<set_finish::SET_FINISH_SPEC>;
#[doc = "Ends DS operation"]
pub mod set_finish;
#[doc = "QUERY_BUSY (r) register accessor: Status of the DS\n\nYou can [`read`](crate::Reg::read) this register and get [`query_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_busy`] module"]
pub type QUERY_BUSY = crate::Reg<query_busy::QUERY_BUSY_SPEC>;
#[doc = "Status of the DS"]
pub mod query_busy;
#[doc = "QUERY_KEY_WRONG (r) register accessor: Checks the reason why DS_KEY is not ready.\n\nYou can [`read`](crate::Reg::read) this register and get [`query_key_wrong::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_key_wrong`] module"]
pub type QUERY_KEY_WRONG = crate::Reg<query_key_wrong::QUERY_KEY_WRONG_SPEC>;
#[doc = "Checks the reason why DS_KEY is not ready."]
pub mod query_key_wrong;
#[doc = "QUERY_CHECK (r) register accessor: Queries DS check result\n\nYou can [`read`](crate::Reg::read) this register and get [`query_check::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_check`] module"]
pub type QUERY_CHECK = crate::Reg<query_check::QUERY_CHECK_SPEC>;
#[doc = "Queries DS check result"]
pub mod query_check;
#[doc = "DATE (rw) register accessor: Version control 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"]
pub type DATE = crate::Reg<date::DATE_SPEC>;
#[doc = "Version control register"]
pub mod date;