2021-07-03 18:15:39 +10:00
|
|
|
#![no_std]
|
|
|
|
|
2021-07-26 20:24:58 +10:00
|
|
|
pub extern crate rp2040_hal as hal;
|
2021-07-03 18:15:39 +10:00
|
|
|
|
|
|
|
#[cfg(feature = "rt")]
|
|
|
|
extern crate cortex_m_rt;
|
|
|
|
#[cfg(feature = "rt")]
|
|
|
|
pub use cortex_m_rt::entry;
|
|
|
|
|
2021-12-05 01:00:09 +11:00
|
|
|
//// The linker will place this boot block at the start of our program image. We
|
|
|
|
//// need this to help the ROM bootloader get our code up and running.
|
|
|
|
#[cfg(feature = "boot2")]
|
|
|
|
#[link_section = ".boot2"]
|
|
|
|
#[no_mangle]
|
|
|
|
#[used]
|
|
|
|
pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
|
|
|
|
2021-07-03 18:15:39 +10:00
|
|
|
pub use hal::pac;
|
|
|
|
|
|
|
|
hal::bsp_pins!(
|
|
|
|
Gpio0 { name: gpio0 },
|
|
|
|
Gpio1 { name: gpio1 },
|
|
|
|
Gpio2 { name: gpio2 },
|
|
|
|
Gpio3 { name: gpio3 },
|
|
|
|
Gpio4 { name: gpio4 },
|
|
|
|
Gpio5 { name: gpio5 },
|
|
|
|
Gpio6 { name: gpio6 },
|
|
|
|
Gpio7 { name: gpio7 },
|
|
|
|
Gpio8 { name: gpio8 },
|
|
|
|
Gpio9 { name: gpio9 },
|
|
|
|
Gpio10 { name: gpio10 },
|
|
|
|
Gpio11 { name: gpio11 },
|
|
|
|
Gpio12 { name: gpio12 },
|
|
|
|
Gpio13 { name: gpio13 },
|
|
|
|
Gpio14 { name: gpio14 },
|
|
|
|
Gpio15 { name: gpio15 },
|
|
|
|
Gpio16 { name: gpio16 },
|
|
|
|
Gpio17 { name: gpio17 },
|
|
|
|
Gpio18 { name: gpio18 },
|
|
|
|
Gpio19 { name: gpio19 },
|
|
|
|
Gpio20 { name: gpio20 },
|
|
|
|
Gpio21 { name: gpio21 },
|
|
|
|
Gpio22 { name: gpio22 },
|
2021-11-17 06:15:04 +11:00
|
|
|
Gpio23 { name: b_power_save },
|
2021-07-03 18:15:39 +10:00
|
|
|
Gpio24 { name: vbus_detect },
|
|
|
|
Gpio25 { name: led },
|
|
|
|
Gpio26 { name: gpio26 },
|
|
|
|
Gpio27 { name: gpio27 },
|
|
|
|
Gpio28 { name: gpio28 },
|
|
|
|
Gpio29 {
|
|
|
|
name: voltage_monitor
|
|
|
|
},
|
|
|
|
);
|
2021-07-26 20:24:58 +10:00
|
|
|
|
|
|
|
pub const XOSC_CRYSTAL_FREQ: u32 = 12_000_000;
|