Skip to content

Commit

Permalink
Revert unrelated changes to example to ease review
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Feb 24, 2024
1 parent 48a870f commit f7e521d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rp2040-hal/examples/adc_fifo_dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ use rp2040_hal::Clock;
// UART related types
use hal::uart::{DataBits, StopBits, UartConfig};

// ADC related types
use hal::adc::AdcPin;
use hal::Adc;

// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use hal::pac;
Expand Down Expand Up @@ -111,13 +107,13 @@ fn main() -> ! {
let dma = pac.DMA.split(&mut pac.RESETS);

// Enable ADC
let mut adc = Adc::new(pac.ADC, &mut pac.RESETS);
let mut adc = hal::Adc::new(pac.ADC, &mut pac.RESETS);

// Enable the temperature sense channel
let mut temperature_sensor = adc.take_temp_sensor().unwrap();

// Configure GPIO26 as an ADC input
let adc_pin_0 = AdcPin::new(pins.gpio26.into_floating_input()).unwrap();
let adc_pin_0 = hal::adc::AdcPin::new(pins.gpio26.into_floating_input()).unwrap();

// we'll capture 1000 samples in total (500 per channel)
// NOTE: when calling `shift_8bit` below, the type here must be changed from `u16` to `u8`
Expand Down

0 comments on commit f7e521d

Please sign in to comment.