diff options
| author | huntc <[email protected]> | 2021-10-18 11:45:23 +1100 |
|---|---|---|
| committer | huntc <[email protected]> | 2021-10-18 11:45:23 +1100 |
| commit | a94d44a689f5832a9eefbaab8f126a388308a08c (patch) | |
| tree | 5694a617f3409f3ae898d32af501dfc429bf0de6 | |
| parent | 6dc0ed53ff9cac8436fdcc767ea8f174c752db6a (diff) | |
Comments corrected
| -rw-r--r-- | embassy-nrf/src/saadc.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/embassy-nrf/src/saadc.rs b/embassy-nrf/src/saadc.rs index 978335108..8bf4f7276 100644 --- a/embassy-nrf/src/saadc.rs +++ b/embassy-nrf/src/saadc.rs | |||
| @@ -237,8 +237,7 @@ impl<'d, const N: usize> Saadc<'d, N> { | |||
| 237 | .await; | 237 | .await; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | /// Continuous sampling with double buffers. The sample buffers generally | 240 | /// Continuous sampling with double buffers. |
| 241 | /// should be a multiple of the number of channels configured. | ||
| 242 | /// | 241 | /// |
| 243 | /// A task-driven approach to driving TASK_SAMPLE is expected. With a task | 242 | /// A task-driven approach to driving TASK_SAMPLE is expected. With a task |
| 244 | /// driven approach, multiple channels can be used. | 243 | /// driven approach, multiple channels can be used. |
| @@ -355,8 +354,7 @@ impl<'d, const N: usize> Saadc<'d, N> { | |||
| 355 | } | 354 | } |
| 356 | 355 | ||
| 357 | impl<'d> Saadc<'d, 1> { | 356 | impl<'d> Saadc<'d, 1> { |
| 358 | /// Continuous sampling on a single channel with double buffers. The sample | 357 | /// Continuous sampling on a single channel with double buffers. |
| 359 | /// buffers generally should be a multiple of the number of channels configured. | ||
| 360 | /// | 358 | /// |
| 361 | /// The internal clock is to be used with a sample rate expressed as a divisor of | 359 | /// The internal clock is to be used with a sample rate expressed as a divisor of |
| 362 | /// 16MHz, ranging from 80..2047. For example, 1600 represnts a sample rate of 10KHz | 360 | /// 16MHz, ranging from 80..2047. For example, 1600 represnts a sample rate of 10KHz |
| @@ -374,7 +372,8 @@ impl<'d> Saadc<'d, 1> { | |||
| 374 | ) where | 372 | ) where |
| 375 | S: FnMut(&[[i16; 1]]) -> SamplerState, | 373 | S: FnMut(&[[i16; 1]]) -> SamplerState, |
| 376 | { | 374 | { |
| 377 | self.run_sampler(bufs, Some(sample_rate_divisor), sampler).await; | 375 | self.run_sampler(bufs, Some(sample_rate_divisor), sampler) |
| 376 | .await; | ||
| 378 | } | 377 | } |
| 379 | } | 378 | } |
| 380 | 379 | ||
