You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/adc.rs
+11-20
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,7 @@ impl RegisterBlock {
32
32
pubconstfnfifo(&self) -> &FIFO{
33
33
&self.fifo
34
34
}
35
-
#[doc = "0x10 - Clock divider. If non-zero, CS_START_MANY will start conversions
36
-
at regular intervals rather than back-to-back.
37
-
The divider is reset when either of these fields are written.
38
-
Total period is 1 + INT + FRAC / 256"]
35
+
#[doc = "0x10 - Clock divider. If non-zero, CS_START_MANY will start conversions at regular intervals rather than back-to-back. The divider is reset when either of these fields are written. Total period is 1 + INT + FRAC / 256"]
39
36
#[inline(always)]
40
37
pubconstfndiv(&self) -> &DIV{
41
38
&self.div
@@ -70,9 +67,9 @@ module"]
70
67
pubtypeCS = crate::Reg<cs::CS_SPEC>;
71
68
#[doc = "ADC Control and Status"]
72
69
pubmod cs;
73
-
#[doc = "RESULT (r) register accessor: Result of most recent ADC conversion
70
+
#[doc = "RESULT (rw) register accessor: Result of most recent ADC conversion
74
71
75
-
You can [`read`](crate::generic::Reg::read) this register and get [`result::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
72
+
You can [`read`](crate::generic::Reg::read) this register and get [`result::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 [`result::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
76
73
77
74
For information about available fields see [`mod@result`]
78
75
module"]
@@ -88,33 +85,27 @@ module"]
88
85
pubtypeFCS = crate::Reg<fcs::FCS_SPEC>;
89
86
#[doc = "FIFO control and status"]
90
87
pubmod fcs;
91
-
#[doc = "FIFO (r) register accessor: Conversion result FIFO
88
+
#[doc = "FIFO (rw) register accessor: Conversion result FIFO
92
89
93
-
You can [`read`](crate::generic::Reg::read) this register and get [`fifo::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
90
+
You can [`read`](crate::generic::Reg::read) this register and get [`fifo::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 [`fifo::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
94
91
95
92
For information about available fields see [`mod@fifo`]
96
93
module"]
97
94
pubtypeFIFO = crate::Reg<fifo::FIFO_SPEC>;
98
95
#[doc = "Conversion result FIFO"]
99
96
pubmod fifo;
100
-
#[doc = "DIV (rw) register accessor: Clock divider. If non-zero, CS_START_MANY will start conversions
101
-
at regular intervals rather than back-to-back.
102
-
The divider is reset when either of these fields are written.
103
-
Total period is 1 + INT + FRAC / 256
97
+
#[doc = "DIV (rw) register accessor: Clock divider. If non-zero, CS_START_MANY will start conversions at regular intervals rather than back-to-back. The divider is reset when either of these fields are written. Total period is 1 + INT + FRAC / 256
104
98
105
99
You can [`read`](crate::generic::Reg::read) this register and get [`div::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 [`div::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
106
100
107
101
For information about available fields see [`mod@div`]
108
102
module"]
109
103
pubtypeDIV = crate::Reg<div::DIV_SPEC>;
110
-
#[doc = "Clock divider. If non-zero, CS_START_MANY will start conversions
111
-
at regular intervals rather than back-to-back.
112
-
The divider is reset when either of these fields are written.
113
-
Total period is 1 + INT + FRAC / 256"]
104
+
#[doc = "Clock divider. If non-zero, CS_START_MANY will start conversions at regular intervals rather than back-to-back. The divider is reset when either of these fields are written. Total period is 1 + INT + FRAC / 256"]
114
105
pubmod div;
115
-
#[doc = "INTR (r) register accessor: Raw Interrupts
106
+
#[doc = "INTR (rw) register accessor: Raw Interrupts
116
107
117
-
You can [`read`](crate::generic::Reg::read) this register and get [`intr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
108
+
You can [`read`](crate::generic::Reg::read) this register and get [`intr::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 [`intr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
118
109
119
110
For information about available fields see [`mod@intr`]
120
111
module"]
@@ -139,9 +130,9 @@ module"]
139
130
pubtypeINTF = crate::Reg<intf::INTF_SPEC>;
140
131
#[doc = "Interrupt Force"]
141
132
pubmod intf;
142
-
#[doc = "INTS (r) register accessor: Interrupt status after masking & forcing
133
+
#[doc = "INTS (rw) register accessor: Interrupt status after masking & forcing
143
134
144
-
You can [`read`](crate::generic::Reg::read) this register and get [`ints::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
135
+
You can [`read`](crate::generic::Reg::read) this register and get [`ints::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 [`ints::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
145
136
146
137
For information about available fields see [`mod@ints`]
#[doc = "Field `START_MANY` reader - Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."]
20
16
pubtypeSTART_MANY_R = crate::BitReader;
21
17
#[doc = "Field `START_MANY` writer - Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."]
#[doc = "Field `READY` reader - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.
24
-
0 whilst conversion in progress."]
19
+
#[doc = "Field `READY` reader - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress."]
25
20
pubtypeREADY_R = crate::BitReader;
26
21
#[doc = "Field `ERR` reader - The most recent ADC conversion encountered an error; result is undefined or noisy."]
#[doc = "Field `RROBIN` reader - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
37
-
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
38
-
The first channel to be sampled will be the one currently indicated by AINSEL.
39
-
AINSEL will be updated after each conversion with the newly-selected channel."]
31
+
#[doc = "Field `RROBIN` reader - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
40
32
pubtypeRROBIN_R = crate::FieldReader;
41
-
#[doc = "Field `RROBIN` writer - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
42
-
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
43
-
The first channel to be sampled will be the one currently indicated by AINSEL.
44
-
AINSEL will be updated after each conversion with the newly-selected channel."]
33
+
#[doc = "Field `RROBIN` writer - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
#[doc = "Bit 0 - Power on ADC and enable its clock.
48
-
1 - enabled. 0 - disabled."]
36
+
#[doc = "Bit 0 - Power on ADC and enable its clock. 1 - enabled. 0 - disabled."]
49
37
#[inline(always)]
50
38
pubfnen(&self) -> EN_R{
51
39
EN_R::new((self.bits&1) != 0)
@@ -55,18 +43,12 @@ impl R {
55
43
pubfnts_en(&self) -> TS_EN_R{
56
44
TS_EN_R::new(((self.bits >> 1)&1) != 0)
57
45
}
58
-
#[doc = "Bit 2 - Start a single conversion. Self-clearing. Ignored if start_many is asserted."]
59
-
#[inline(always)]
60
-
pubfnstart_once(&self) -> START_ONCE_R{
61
-
START_ONCE_R::new(((self.bits >> 2)&1) != 0)
62
-
}
63
46
#[doc = "Bit 3 - Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."]
64
47
#[inline(always)]
65
48
pubfnstart_many(&self) -> START_MANY_R{
66
49
START_MANY_R::new(((self.bits >> 3)&1) != 0)
67
50
}
68
-
#[doc = "Bit 8 - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.
69
-
0 whilst conversion in progress."]
51
+
#[doc = "Bit 8 - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress."]
70
52
#[inline(always)]
71
53
pubfnready(&self) -> READY_R{
72
54
READY_R::new(((self.bits >> 8)&1) != 0)
@@ -86,18 +68,14 @@ impl R {
86
68
pubfnainsel(&self) -> AINSEL_R{
87
69
AINSEL_R::new(((self.bits >> 12)&7)asu8)
88
70
}
89
-
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
90
-
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
91
-
The first channel to be sampled will be the one currently indicated by AINSEL.
92
-
AINSEL will be updated after each conversion with the newly-selected channel."]
71
+
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
93
72
#[inline(always)]
94
73
pubfnrrobin(&self) -> RROBIN_R{
95
74
RROBIN_R::new(((self.bits >> 16)&0x1f)asu8)
96
75
}
97
76
}
98
77
implW{
99
-
#[doc = "Bit 0 - Power on ADC and enable its clock.
100
-
1 - enabled. 0 - disabled."]
78
+
#[doc = "Bit 0 - Power on ADC and enable its clock. 1 - enabled. 0 - disabled."]
101
79
#[inline(always)]
102
80
#[must_use]
103
81
pubfnen(&mutself) -> EN_W<CS_SPEC>{
@@ -133,10 +111,7 @@ impl W {
133
111
pubfnainsel(&mutself) -> AINSEL_W<CS_SPEC>{
134
112
AINSEL_W::new(self,12)
135
113
}
136
-
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
137
-
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
138
-
The first channel to be sampled will be the one currently indicated by AINSEL.
139
-
AINSEL will be updated after each conversion with the newly-selected channel."]
114
+
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
Copy file name to clipboardexpand all lines: src/adc/div.rs
+1-4
Original file line number
Diff line number
Diff line change
@@ -36,10 +36,7 @@ impl W {
36
36
INT_W::new(self,8)
37
37
}
38
38
}
39
-
#[doc = "Clock divider. If non-zero, CS_START_MANY will start conversions
40
-
at regular intervals rather than back-to-back.
41
-
The divider is reset when either of these fields are written.
42
-
Total period is 1 + INT + FRAC / 256
39
+
#[doc = "Clock divider. If non-zero, CS_START_MANY will start conversions at regular intervals rather than back-to-back. The divider is reset when either of these fields are written. Total period is 1 + INT + FRAC / 256
43
40
44
41
You can [`read`](crate::generic::Reg::read) this register and get [`div::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 [`div::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
Copy file name to clipboardexpand all lines: src/adc/fifo.rs
+16-3
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
#[doc = "Register `FIFO` reader"]
2
2
pubtypeR = crate::R<FIFO_SPEC>;
3
-
#[doc = "Field `VAL` reader - "]
3
+
#[doc = "Register `FIFO` writer"]
4
+
pubtypeW = crate::W<FIFO_SPEC>;
5
+
#[doc = "Field `VAL` reader -
6
+
7
+
The field is **modified** in some way after a read operation."]
4
8
pubtypeVAL_R = crate::FieldReader<u16>;
5
-
#[doc = "Field `ERR` reader - 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted."]
9
+
#[doc = "Field `ERR` reader - 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted.
10
+
11
+
The field is **modified** in some way after a read operation."]
6
12
pubtypeERR_R = crate::BitReader;
7
13
implR{
8
14
#[doc = "Bits 0:11"]
@@ -16,15 +22,22 @@ impl R {
16
22
ERR_R::new(((self.bits >> 15)&1) != 0)
17
23
}
18
24
}
25
+
implW{}
19
26
#[doc = "Conversion result FIFO
20
27
21
-
You can [`read`](crate::generic::Reg::read) this register and get [`fifo::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
28
+
You can [`read`](crate::generic::Reg::read) this register and get [`fifo::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 [`fifo::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
0 commit comments