diff --git a/Cargo.toml b/Cargo.toml index a41880c..0f4cfee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,5 +2,7 @@ members = [ "rp2040-hal", "boards/feather_rp2040", + "boards/pico", "boards/pico_explorer", + "boards/pico_lipo_16mb", ] diff --git a/boards/pico-bsp/src/lib.rs b/boards/pico-bsp/src/lib.rs deleted file mode 100644 index 31e1bb2..0000000 --- a/boards/pico-bsp/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - assert_eq!(2 + 2, 4); - } -} diff --git a/boards/pico-bsp/.gitignore b/boards/pico/.gitignore similarity index 100% rename from boards/pico-bsp/.gitignore rename to boards/pico/.gitignore diff --git a/boards/pico-bsp/Cargo.toml b/boards/pico/Cargo.toml similarity index 59% rename from boards/pico-bsp/Cargo.toml rename to boards/pico/Cargo.toml index 45fd684..5a6a556 100644 --- a/boards/pico-bsp/Cargo.toml +++ b/boards/pico/Cargo.toml @@ -1,13 +1,15 @@ [package] -name = "pico-bsp" +name = "pico" version = "0.1.0" authors = ["evan "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/pico-bsc" +homepage = "https://github.com/rp-rs/rp-hal/boards/pico" description = "Board Support Package for the Raspberry Pi Pico" license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rp2040-hal = "0.1.0" \ No newline at end of file +cortex-m = "0.7.2" +rp2040-hal = { path = "../../rp2040-hal", version = "0.1.0" } +cortex-m-rt = { version = "0.6.14", optional = true } \ No newline at end of file diff --git a/boards/pico-bsp/README.md b/boards/pico/README.md similarity index 100% rename from boards/pico-bsp/README.md rename to boards/pico/README.md diff --git a/boards/pico/src/lib.rs b/boards/pico/src/lib.rs new file mode 100644 index 0000000..cd458e4 --- /dev/null +++ b/boards/pico/src/lib.rs @@ -0,0 +1,45 @@ +#![no_std] + +extern crate rp2040_hal as hal; + +#[cfg(feature = "rt")] +extern crate cortex_m_rt; +#[cfg(feature = "rt")] +pub use cortex_m_rt::entry; + +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 }, + Gpio23 { name: bootsel }, + Gpio24 { name: vbus_detect }, + Gpio25 { name: led }, + Gpio26 { name: gpio26 }, + Gpio27 { name: gpio27 }, + Gpio28 { name: gpio28 }, + Gpio29 { + name: voltage_monitor + }, +); diff --git a/boards/pico_explorer/src/lib.rs b/boards/pico_explorer/src/lib.rs index 7291043..56b7f48 100644 --- a/boards/pico_explorer/src/lib.rs +++ b/boards/pico_explorer/src/lib.rs @@ -86,10 +86,7 @@ hal::bsp_pins!( name: i2c_scl, aliases: { FunctionI2C: Scl } }, - Gpio22 { - name: i2c_int, - aliases: { FunctionI2C: Int } - }, + Gpio22 { name: i2c_int }, Gpio25 { name: led }, Gpio26 { name: adc0 }, Gpio27 { name: adc1 }, diff --git a/boards/pico_lipo_16mb/Cargo.toml b/boards/pico_lipo_16mb/Cargo.toml new file mode 100644 index 0000000..34f8142 --- /dev/null +++ b/boards/pico_lipo_16mb/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "pico_lipo_16_mb" +version = "0.1.0" +authors = ["Hmvp "] +edition = "2018" +homepage = "https://github.com/rp-rs/rp-hal/boards/pico_lipo_16_mb" +description = "Board Support Package for the Pico LiPo 16 Mb" +license = "MIT OR Apache-2.0" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cortex-m = "0.7.2" +rp2040-hal = { path = "../../rp2040-hal", version = "0.1.0" } +cortex-m-rt = { version = "0.6.14", optional = true } + +[features] +default = ["rt"] +rt = ["cortex-m-rt"] \ No newline at end of file diff --git a/boards/pico_lipo_16mb/src/lib.rs b/boards/pico_lipo_16mb/src/lib.rs new file mode 100644 index 0000000..ab97934 --- /dev/null +++ b/boards/pico_lipo_16mb/src/lib.rs @@ -0,0 +1,43 @@ +#![no_std] + +extern crate rp2040_hal as hal; + +#[cfg(feature = "rt")] +extern crate cortex_m_rt; +#[cfg(feature = "rt")] +pub use cortex_m_rt::entry; + +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 }, + Gpio23 { name: bootsel }, + Gpio24 { name: vbus_detect }, + Gpio25 { name: led }, + Gpio26 { name: gpio26 }, + Gpio27 { name: gpio27 }, + Gpio28 { name: gpio28 }, + Gpio29 { name: batt_sense }, +);