Skip to content

Commit fed8d2a

Browse files
committed
Fix doc tests
1 parent 8eaff0f commit fed8d2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rp2040-hal/src/adc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
//! loop {
6666
//! if fifo.len() > 0 {
6767
//! // Read one captured ADC sample from the FIFO:
68-
//! let temperature_adc_counts: u16 = fifo.read();
68+
//! let temperature_adc_counts: Result<u16, _> = fifo.read();
6969
//! }
7070
//! }
7171
//! ```
@@ -145,7 +145,7 @@
145145
//! adc.free_running(&adc_pin_0);
146146
//! // Read the ADC counts from the ADC channel whenever necessary
147147
//! loop {
148-
//! let pin_adc_counts: u16 = adc.read_single();
148+
//! let pin_adc_counts: Result<u16, _> = adc.read_single();
149149
//! // Do time critical stuff
150150
//! }
151151
//! ```

rp235x-hal/src/adc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
//! loop {
8282
//! if fifo.len() > 0 {
8383
//! // Read one captured ADC sample from the FIFO:
84-
//! let temperature_adc_counts: u16 = fifo.read();
84+
//! let temperature_adc_counts: Result<u16, _> = fifo.read();
8585
//! }
8686
//! }
8787
//! ```
@@ -164,7 +164,7 @@
164164
//! adc.free_running(&adc_pin_0);
165165
//! // Read the ADC counts from the ADC channel whenever necessary
166166
//! loop {
167-
//! let pin_adc_counts: u16 = adc.read_single();
167+
//! let pin_adc_counts: Result<u16, _> = adc.read_single();
168168
//! // Do time critical stuff
169169
//! }
170170
//! ```

0 commit comments

Comments
 (0)