@@ -116,15 +116,15 @@ impl From<super::Error> for BuilderError {
116
116
/// the sample rate of the ADC
117
117
///
118
118
/// To begin with, the ADC Clock is driven by the peripheral clock divided with
119
- /// a divider (see [Config::clock_divider] ).
119
+ /// a divider (see [`with_clock_divider`](Self::with_clock_divider) ).
120
120
///
121
- /// Each sample is read by the ADC over
122
- /// [Config::sample_clock_cycles] clock cycles , and then transmitted
123
- /// to the ADC register over [Config::bit_width] clock cycles (1
124
- /// clock cycle per bit)
121
+ /// Each sample is read by the ADC over `n` clock cycles (see
122
+ /// [`with_clock_cycles_per_sample`](Self::with_clock_cycles_per_sample)) , and
123
+ /// then transmitted to the ADC register over `t` clock cycles (1
124
+ /// clock cycle per bit, see [`AdcResolution`]).
125
125
///
126
126
/// The ADC can also be configured to combine multiple simultaneous readings in
127
- /// either an average or summed mode (See [Accumulation]), this also affects
127
+ /// either an average or summed mode (see [Accumulation]), this also affects
128
128
/// the overall sample rate of the ADC as the ADC has to do multiple
129
129
/// samples before a result is ready.
130
130
///
@@ -204,12 +204,13 @@ impl AdcBuilder {
204
204
205
205
/// Sets the number of ADC clock cycles taken to sample a single
206
206
/// sample. The higher this number, the longer it will take the ADC to
207
- /// sample each sample. Smaller values will make the ADC perform more samples per second,
208
- /// but there may be more noise in each sample leading to irratic values.
207
+ /// sample each sample. Smaller values will make the ADC perform more
208
+ /// samples per second, but there may be more noise in each sample
209
+ /// leading to irratic values.
209
210
///
210
211
/// ## Safety
211
- /// * This function will clamp input value between 1 and 63, to conform to the ADC registers
212
- /// min and max values.
212
+ /// * This function will clamp input value between 1 and 63, to conform to
213
+ /// the ADC registers min and max values.
213
214
pub fn with_clock_cycles_per_sample ( mut self , num : u8 ) -> Self {
214
215
self . sample_clock_cycles = Some ( num. clamp ( 1 , 63 ) ) ; // Clamp in range
215
216
self
0 commit comments