diff --git a/boards/rp-pico/examples/pico_uart_irq_buffer.rs b/boards/rp-pico/examples/pico_uart_irq_buffer.rs index 685f9f8..c4681d9 100644 --- a/boards/rp-pico/examples/pico_uart_irq_buffer.rs +++ b/boards/rp-pico/examples/pico_uart_irq_buffer.rs @@ -73,10 +73,6 @@ struct UartQueue { interrupt: pac::Interrupt, } -/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust -/// if your board has a different frequency -const XTAL_FREQ_HZ: u32 = 12_000_000u32; - /// This how we transfer the UART into the Interrupt Handler static GLOBAL_UART: Mutex>> = Mutex::new(RefCell::new(None)); @@ -105,7 +101,7 @@ fn main() -> ! { // Configure the clocks let clocks = hal::clocks::init_clocks_and_plls( - XTAL_FREQ_HZ, + rp_pico::XOSC_CRYSTAL_FREQ, pac.XOSC, pac.CLOCKS, pac.PLL_SYS, diff --git a/boards/rp-pico/examples/pico_uart_irq_echo.rs b/boards/rp-pico/examples/pico_uart_irq_echo.rs index 6835d22..fdf6918 100644 --- a/boards/rp-pico/examples/pico_uart_irq_echo.rs +++ b/boards/rp-pico/examples/pico_uart_irq_echo.rs @@ -64,10 +64,6 @@ type UartPins = ( /// Alias the type for our UART to make things clearer. type Uart = hal::uart::UartPeripheral; -/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust -/// if your board has a different frequency -const XTAL_FREQ_HZ: u32 = 12_000_000u32; - /// This how we transfer the UART into the Interrupt Handler static GLOBAL_UART: Mutex>> = Mutex::new(RefCell::new(None)); @@ -89,7 +85,7 @@ fn main() -> ! { // Configure the clocks let clocks = hal::clocks::init_clocks_and_plls( - XTAL_FREQ_HZ, + rp_pico::XOSC_CRYSTAL_FREQ, pac.XOSC, pac.CLOCKS, pac.PLL_SYS,