Skip to content

Commit

Permalink
Remove XOSC setup from example
Browse files Browse the repository at this point in the history
  • Loading branch information
PietPtr committed Dec 31, 2024
1 parent eae0599 commit a8c902f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rp2040-hal-examples/src/bin/gpin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use rp2040_hal::clocks::ClockSource;
use rp2040_hal as hal;

// Necessary HAL types
use hal::{clocks::ClocksManager, gpin::GpIn0, gpio, xosc::setup_xosc_blocking, Clock, Sio};
use hal::{clocks::ClocksManager, gpin::GpIn0, gpio, Clock, Sio};

// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
Expand All @@ -38,8 +38,6 @@ pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;

// The external clock provided to GPIO pin 20.
const GPIN_EXTERNAL_CLOCK_FREQ_HZ: u32 = 1_000_000u32;
// Frequency of the external crystal on the board. This value works for an RPi Pico.
const EXTERNAL_XTAL_FREQ_HZ: u32 = 12_000_000u32;

/// Entry point to our bare-metal application.
///
Expand All @@ -54,8 +52,6 @@ fn main() -> ! {

let sio = Sio::new(pac.SIO);

let _xosc = setup_xosc_blocking(pac.XOSC, EXTERNAL_XTAL_FREQ_HZ.Hz()).unwrap();

let pins = gpio::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
Expand Down

0 comments on commit a8c902f

Please sign in to comment.