sparkfun_thing_plus_rp2040/
lib.rs

1#![no_std]
2
3pub use rp2040_hal as hal;
4#[cfg(feature = "rt")]
5pub use rp2040_hal::entry;
6
7/// The linker will place this boot block at the start of our program image. We
8/// need this to help the ROM bootloader get our code up and running.
9#[cfg(feature = "boot2")]
10#[link_section = ".boot2"]
11#[no_mangle]
12#[used]
13pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
14
15pub use hal::pac;
16
17hal::bsp_pins!(
18    Gpio0 { name: tx },
19    Gpio1 { name: rx },
20    Gpio2 { name: sck },
21    Gpio3 { name: copi },
22    Gpio4 { name: cipo },
23    Gpio6 { name: sda },
24    Gpio7 { name: scl },
25    Gpio8 { name: ws2812 },
26    Gpio16 { name: gpio16 },
27    Gpio17 { name: gpio17 },
28    Gpio18 { name: gpio18 },
29    Gpio19 { name: gpio19 },
30    Gpio20 { name: gpio20 },
31    Gpio21 { name: gpio21 },
32    Gpio22 { name: gpio22 },
33    Gpio25 { name: led },
34    Gpio26 { name: adc0 },
35    Gpio27 { name: adc1 },
36    Gpio28 { name: adc2 },
37    Gpio29 { name: adc3 },
38);
39
40pub const XOSC_CRYSTAL_FREQ: u32 = 12_000_000;