From 37e7d2e7b65828364d922c939cfcab21ec5da32d Mon Sep 17 00:00:00 2001 From: Jonathan Pallant Date: Mon, 20 Dec 2021 21:10:10 +0000 Subject: [PATCH] Update all the BSPs. Crate names now have hyphens, to match rp2040-hal. Every BSP has its own CHANGELOG. Embassy stuff is removed (it blocks publishing on crates.io) --- Cargo.toml | 14 +-- boards/adafruit-macropad/CHANGELOG.md | 23 ++++ .../Cargo.toml | 5 +- .../README.md | 10 +- .../src/lib.rs | 0 boards/feather-rp2040/CHANGELOG.md | 23 ++++ .../Cargo.toml | 5 +- .../README.md | 10 +- .../examples/feather_blinky.rs | 0 .../examples/feather_neopixel_rainbow.rs | 0 .../src/lib.rs | 0 boards/itsy-bitsy-rp2040/CHANGELOG.md | 23 ++++ .../Cargo.toml | 5 +- .../README.md | 10 +- .../examples/itsy_bitsy_blinky.rs | 0 .../examples/itsy_bitsy_rainbow.rs | 0 .../src/lib.rs | 0 boards/kb2040/CHANGELOG.md | 23 ++++ boards/kb2040/Cargo.toml | 3 +- boards/kb2040/README.md | 2 +- boards/pico-explorer/CHANGELOG.md | 23 ++++ .../Cargo.toml | 5 +- .../README.md | 10 +- .../examples/pico_explorer_showcase.rs | 0 .../src/lib.rs | 0 boards/pico-lipo-16mb/CHANGELOG.md | 23 ++++ .../Cargo.toml | 7 +- .../README.md | 10 +- .../examples/pico_lipo_16mb_blinky.rs | 10 +- .../src/lib.rs | 0 boards/pico/CHANGELOG.md | 23 ++++ boards/pico/Cargo.toml | 21 +--- boards/pico/README.md | 2 +- .../controller.rs | 47 ------- .../pico_i2c_controller_peripheral/main.rs | 119 ------------------ .../peripheral.rs | 95 -------------- boards/pro-micro-rp2040/CHANGELOG.md | 23 ++++ .../Cargo.toml | 5 +- .../README.md | 13 +- .../examples/pro_micro_rainbow.rs | 0 .../src/lib.rs | 0 boards/qt-py-rp2040/CHANGELOG.md | 23 ++++ .../{qt_py_rp2040 => qt-py-rp2040}/Cargo.toml | 5 +- .../{qt_py_rp2040 => qt-py-rp2040}/README.md | 10 +- .../examples/qt_py_rainbow.rs | 0 .../{qt_py_rp2040 => qt-py-rp2040}/src/lib.rs | 0 46 files changed, 284 insertions(+), 346 deletions(-) create mode 100644 boards/adafruit-macropad/CHANGELOG.md rename boards/{adafruit_macropad => adafruit-macropad}/Cargo.toml (78%) rename boards/{adafruit_macropad => adafruit-macropad}/README.md (90%) rename boards/{adafruit_macropad => adafruit-macropad}/src/lib.rs (100%) create mode 100644 boards/feather-rp2040/CHANGELOG.md rename boards/{feather_rp2040 => feather-rp2040}/Cargo.toml (84%) rename boards/{feather_rp2040 => feather-rp2040}/README.md (90%) rename boards/{feather_rp2040 => feather-rp2040}/examples/feather_blinky.rs (100%) rename boards/{feather_rp2040 => feather-rp2040}/examples/feather_neopixel_rainbow.rs (100%) rename boards/{feather_rp2040 => feather-rp2040}/src/lib.rs (100%) create mode 100644 boards/itsy-bitsy-rp2040/CHANGELOG.md rename boards/{itsy_bitsy_rp2040 => itsy-bitsy-rp2040}/Cargo.toml (84%) rename boards/{itsy_bitsy_rp2040 => itsy-bitsy-rp2040}/README.md (90%) rename boards/{itsy_bitsy_rp2040 => itsy-bitsy-rp2040}/examples/itsy_bitsy_blinky.rs (100%) rename boards/{itsy_bitsy_rp2040 => itsy-bitsy-rp2040}/examples/itsy_bitsy_rainbow.rs (100%) rename boards/{itsy_bitsy_rp2040 => itsy-bitsy-rp2040}/src/lib.rs (100%) create mode 100644 boards/kb2040/CHANGELOG.md create mode 100644 boards/pico-explorer/CHANGELOG.md rename boards/{pico_explorer => pico-explorer}/Cargo.toml (85%) rename boards/{pico_explorer => pico-explorer}/README.md (90%) rename boards/{pico_explorer => pico-explorer}/examples/pico_explorer_showcase.rs (100%) rename boards/{pico_explorer => pico-explorer}/src/lib.rs (100%) create mode 100644 boards/pico-lipo-16mb/CHANGELOG.md rename boards/{pico_lipo_16mb => pico-lipo-16mb}/Cargo.toml (75%) rename boards/{pico_lipo_16mb => pico-lipo-16mb}/README.md (90%) rename boards/{pico_lipo_16mb => pico-lipo-16mb}/examples/pico_lipo_16mb_blinky.rs (93%) rename boards/{pico_lipo_16mb => pico-lipo-16mb}/src/lib.rs (100%) create mode 100644 boards/pico/CHANGELOG.md delete mode 100644 boards/pico/examples/pico_i2c_controller_peripheral/controller.rs delete mode 100644 boards/pico/examples/pico_i2c_controller_peripheral/main.rs delete mode 100644 boards/pico/examples/pico_i2c_controller_peripheral/peripheral.rs create mode 100644 boards/pro-micro-rp2040/CHANGELOG.md rename boards/{pro_micro_rp2040 => pro-micro-rp2040}/Cargo.toml (85%) rename boards/{pro_micro_rp2040 => pro-micro-rp2040}/README.md (88%) rename boards/{pro_micro_rp2040 => pro-micro-rp2040}/examples/pro_micro_rainbow.rs (100%) rename boards/{pro_micro_rp2040 => pro-micro-rp2040}/src/lib.rs (100%) create mode 100644 boards/qt-py-rp2040/CHANGELOG.md rename boards/{qt_py_rp2040 => qt-py-rp2040}/Cargo.toml (85%) rename boards/{qt_py_rp2040 => qt-py-rp2040}/README.md (90%) rename boards/{qt_py_rp2040 => qt-py-rp2040}/examples/qt_py_rainbow.rs (100%) rename boards/{qt_py_rp2040 => qt-py-rp2040}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 7721fe8..c624c96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,15 +2,15 @@ resolver = "2" members = [ "rp2040-hal", - "boards/feather_rp2040", - "boards/qt_py_rp2040", - "boards/itsy_bitsy_rp2040", + "boards/feather-rp2040", + "boards/qt-py-rp2040", + "boards/itsy-bitsy-rp2040", "boards/kb2040", "boards/pico", - "boards/pico_explorer", - "boards/pico_lipo_16mb", - "boards/adafruit_macropad", - "boards/pro_micro_rp2040", + "boards/pico-explorer", + "boards/pico-lipo-16mb", + "boards/adafruit-macropad", + "boards/pro-micro-rp2040", ] [patch.'https://github.com/rp-rs/rp-hal.git'] diff --git a/boards/adafruit-macropad/CHANGELOG.md b/boards/adafruit-macropad/CHANGELOG.md new file mode 100644 index 0000000..7e7d0a9 --- /dev/null +++ b/boards/adafruit-macropad/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/adafruit-macropad-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/adafruit-macropad-v0.1.0 diff --git a/boards/adafruit_macropad/Cargo.toml b/boards/adafruit-macropad/Cargo.toml similarity index 78% rename from boards/adafruit_macropad/Cargo.toml rename to boards/adafruit-macropad/Cargo.toml index 6ceb84f..b8f850c 100644 --- a/boards/adafruit_macropad/Cargo.toml +++ b/boards/adafruit-macropad/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "adafruit_macropad" +name = "adafruit-macropad" version = "0.1.0" authors = ["Andrea Nall "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/adafruit_macropad" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit_macropad" description = "Board Support Package for the Adafruit Macropad" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/adafruit_macropad/README.md b/boards/adafruit-macropad/README.md similarity index 90% rename from boards/adafruit_macropad/README.md rename to boards/adafruit-macropad/README.md index b5875dd..73af932 100644 --- a/boards/adafruit_macropad/README.md +++ b/boards/adafruit-macropad/README.md @@ -1,4 +1,4 @@ -# [adafruit_macropad] - Board Support for the [Adafruit Macropad] +# [adafruit-macropad] - Board Support for the [Adafruit Macropad] You should include this crate if you are writing code that you want to run on an [Adafruit Macropad] - a 3x4 keyboard and OLED combo board from Adafruit. @@ -6,7 +6,7 @@ an [Adafruit Macropad] - a 3x4 keyboard and OLED combo board from Adafruit. This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the Feather. -[adafruit_macropad]: https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit_macropad +[adafruit-macropad]: https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit-macropad [Adafruit Macropad]: https://www.adafruit.com/product/5128 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the Feather. To use this crate, your `Cargo.toml` file should contain: ```toml -adafruit_macropad = { git = "https://github.com/rp-rs/rp-hal.git" } +adafruit-macropad = "0.1.0" ``` In your program, you will need to call `adafruit_macropad::Pins::new` to create @@ -30,7 +30,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/adafruit_macropad $ cargo build --release --example +rp-hal/boards/adafruit-macropad $ cargo build --release --example ``` You will get an ELF file called @@ -44,7 +44,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/adafruit_macropad $ cargo run --release --example +rp-hal/boards/adafruit-macropad $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/adafruit_macropad/src/lib.rs b/boards/adafruit-macropad/src/lib.rs similarity index 100% rename from boards/adafruit_macropad/src/lib.rs rename to boards/adafruit-macropad/src/lib.rs diff --git a/boards/feather-rp2040/CHANGELOG.md b/boards/feather-rp2040/CHANGELOG.md new file mode 100644 index 0000000..e47afdb --- /dev/null +++ b/boards/feather-rp2040/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/feather-rp2040-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/feather-rp2040-v0.1.0 diff --git a/boards/feather_rp2040/Cargo.toml b/boards/feather-rp2040/Cargo.toml similarity index 84% rename from boards/feather_rp2040/Cargo.toml rename to boards/feather-rp2040/Cargo.toml index 5c2dcf2..8746bda 100644 --- a/boards/feather_rp2040/Cargo.toml +++ b/boards/feather-rp2040/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "feather_rp2040" +name = "feather-rp2040" version = "0.1.0" authors = ["Andrea Nall "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/feather_rp2040" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/feather-rp2040" description = "Board Support Package for the Adafruit Feather RP2040" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/feather_rp2040/README.md b/boards/feather-rp2040/README.md similarity index 90% rename from boards/feather_rp2040/README.md rename to boards/feather-rp2040/README.md index 8dd6bdf..8b8e5d7 100644 --- a/boards/feather_rp2040/README.md +++ b/boards/feather-rp2040/README.md @@ -1,4 +1,4 @@ -# [feather_rp2040] - Board Support for the [Adafruit Feather RP2040] +# [feather-rp2040] - Board Support for the [Adafruit Feather RP2040] You should include this crate if you are writing code that you want to run on an [Adafruit Feather RP2040] - a Feather form-factor RP2040 board from Adafruit. @@ -7,7 +7,7 @@ This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the Feather. [Adafruit Feather RP2040]: https://www.adafruit.com/product/4884 -[feather_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/feather_rp2040 +[feather-rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/feather-rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the Feather. To use this crate, your `Cargo.toml` file should contain: ```toml -feather_rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } +feather-rp2040 = "0.1.0" ``` In your program, you will need to call `feather_rp2040::Pins::new` to create @@ -30,7 +30,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/feather_rp2040 $ cargo build --release --example +rp-hal/boards/feather-rp2040 $ cargo build --release --example ``` You will get an ELF file called @@ -44,7 +44,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/feather_rp2040 $ cargo run --release --example +rp-hal/boards/feather-rp2040 $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/feather_rp2040/examples/feather_blinky.rs b/boards/feather-rp2040/examples/feather_blinky.rs similarity index 100% rename from boards/feather_rp2040/examples/feather_blinky.rs rename to boards/feather-rp2040/examples/feather_blinky.rs diff --git a/boards/feather_rp2040/examples/feather_neopixel_rainbow.rs b/boards/feather-rp2040/examples/feather_neopixel_rainbow.rs similarity index 100% rename from boards/feather_rp2040/examples/feather_neopixel_rainbow.rs rename to boards/feather-rp2040/examples/feather_neopixel_rainbow.rs diff --git a/boards/feather_rp2040/src/lib.rs b/boards/feather-rp2040/src/lib.rs similarity index 100% rename from boards/feather_rp2040/src/lib.rs rename to boards/feather-rp2040/src/lib.rs diff --git a/boards/itsy-bitsy-rp2040/CHANGELOG.md b/boards/itsy-bitsy-rp2040/CHANGELOG.md new file mode 100644 index 0000000..6945e08 --- /dev/null +++ b/boards/itsy-bitsy-rp2040/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/itsy-bitsy-rp2040-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/itsy-bitsy-rp2040-v0.1.0 diff --git a/boards/itsy_bitsy_rp2040/Cargo.toml b/boards/itsy-bitsy-rp2040/Cargo.toml similarity index 84% rename from boards/itsy_bitsy_rp2040/Cargo.toml rename to boards/itsy-bitsy-rp2040/Cargo.toml index 4b308df..99887c2 100644 --- a/boards/itsy_bitsy_rp2040/Cargo.toml +++ b/boards/itsy-bitsy-rp2040/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "itsy_bitsy_rp2040" +name = "itsy-bitsy-rp2040" version = "0.1.0" authors = ["Andrew Christiansen "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/itsy_bitsy_rp2040" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/itsy_bitsy_rp2040" description = "Board Support Package for the Adafruit ItsyBitsy RP2040" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/itsy_bitsy_rp2040/README.md b/boards/itsy-bitsy-rp2040/README.md similarity index 90% rename from boards/itsy_bitsy_rp2040/README.md rename to boards/itsy-bitsy-rp2040/README.md index f640609..0212304 100644 --- a/boards/itsy_bitsy_rp2040/README.md +++ b/boards/itsy-bitsy-rp2040/README.md @@ -1,4 +1,4 @@ -# [itsy_bitsy_rp2040] - Board Support for the [Adafruit ItsyBitsy RP2040] +# [itsy-bitsy-rp2040] - Board Support for the [Adafruit ItsyBitsy RP2040] You should include this crate if you are writing code that you want to run on an [Adafruit ItsyBitsy RP2040] - an RP2040 board in the Itsy family from Adafruit. @@ -7,7 +7,7 @@ This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the ItsyBitsy RP2040. [Adafruit ItsyBitsy RP2040]: https://www.adafruit.com/product/4888 -[itsy_bitsy_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/itsy_bitsy_rp2040 +[itsy-bitsy-rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/itsy-bitsy-rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the ItsyBitsy RP2040. To use this crate, your `Cargo.toml` file should contain: ```toml -itsy_bitsy_rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } +itsy-bitsy-rp2040 = "0.1.0" ``` In your program, you will need to call `itsy_bitsy_rp2040::Pins::new` to create @@ -30,7 +30,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/itsy_bitsy_rp2040 $ cargo build --release --example +rp-hal/boards/itsy-bitsy-rp2040 $ cargo build --release --example ``` You will get an ELF file called @@ -44,7 +44,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/itsy_bitsy_rp2040 $ cargo run --release --example +rp-hal/boards/itsy-bitsy-rp2040 $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs b/boards/itsy-bitsy-rp2040/examples/itsy_bitsy_blinky.rs similarity index 100% rename from boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs rename to boards/itsy-bitsy-rp2040/examples/itsy_bitsy_blinky.rs diff --git a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs b/boards/itsy-bitsy-rp2040/examples/itsy_bitsy_rainbow.rs similarity index 100% rename from boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs rename to boards/itsy-bitsy-rp2040/examples/itsy_bitsy_rainbow.rs diff --git a/boards/itsy_bitsy_rp2040/src/lib.rs b/boards/itsy-bitsy-rp2040/src/lib.rs similarity index 100% rename from boards/itsy_bitsy_rp2040/src/lib.rs rename to boards/itsy-bitsy-rp2040/src/lib.rs diff --git a/boards/kb2040/CHANGELOG.md b/boards/kb2040/CHANGELOG.md new file mode 100644 index 0000000..1df8cdb --- /dev/null +++ b/boards/kb2040/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/kb2040-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/kb2040-v0.1.0 diff --git a/boards/kb2040/Cargo.toml b/boards/kb2040/Cargo.toml index 5a3794c..814a548 100644 --- a/boards/kb2040/Cargo.toml +++ b/boards/kb2040/Cargo.toml @@ -3,9 +3,10 @@ name = "kb2040" version = "0.1.0" authors = ["Andrew Christiansen "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/kb2040" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/kb2040" description = "Board Support Package for the Adafruit KB2040" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/kb2040/README.md b/boards/kb2040/README.md index 266af8a..1214629 100644 --- a/boards/kb2040/README.md +++ b/boards/kb2040/README.md @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the KB2040. To use this crate, your `Cargo.toml` file should contain: ```toml -kb2040 = { git = "https://github.com/rp-rs/rp-hal.git" } +kb2040 = "0.1.0" ``` In your program, you will need to call `kb2040::Pins::new` to create diff --git a/boards/pico-explorer/CHANGELOG.md b/boards/pico-explorer/CHANGELOG.md new file mode 100644 index 0000000..d504396 --- /dev/null +++ b/boards/pico-explorer/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/pico-explorer-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/pico-explorer-v0.1.0 diff --git a/boards/pico_explorer/Cargo.toml b/boards/pico-explorer/Cargo.toml similarity index 85% rename from boards/pico_explorer/Cargo.toml rename to boards/pico-explorer/Cargo.toml index 58d1575..3574405 100644 --- a/boards/pico_explorer/Cargo.toml +++ b/boards/pico-explorer/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "pico_explorer" +name = "pico-explorer" version = "0.1.0" authors = ["Hmvp "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/pico_explorer" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/pico-explorer" description = "Board Support Package for the Pico Explorer" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/pico_explorer/README.md b/boards/pico-explorer/README.md similarity index 90% rename from boards/pico_explorer/README.md rename to boards/pico-explorer/README.md index 25e99e1..aa6ed50 100644 --- a/boards/pico_explorer/README.md +++ b/boards/pico-explorer/README.md @@ -1,4 +1,4 @@ -# [pico_explorer] - Board Support for the [Pimoroni Pico Explorer] +# [pico-explorer] - Board Support for the [Pimoroni Pico Explorer] You should include this crate if you are writing code that you want to run on a [Pimoroni Pico Explorer] - a board featuring a small LCD screen, a @@ -8,7 +8,7 @@ This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the Pico Explorer. [Pimoroni Pico Explorer]: https://shop.pimoroni.com/products/pico-explorer-base -[pico_explorer]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico_explorer +[pico-explorer]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico-explorer [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -17,7 +17,7 @@ RP2040 chip according to how it is connected up on the Pico Explorer. To use this crate, your `Cargo.toml` file should contain: ```toml -pico_explorer = { git = "https://github.com/rp-rs/rp-hal.git" } +pico-explorer = "0.1.0" ``` In your program, you will need to call `pico_explorer::Pins::new` to create @@ -31,7 +31,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/pico_explorer $ cargo build --release --example +rp-hal/boards/pico-explorer $ cargo build --release --example ``` You will get an ELF file called @@ -45,7 +45,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/pico_explorer $ cargo run --release --example +rp-hal/boards/pico-explorer $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/pico_explorer/examples/pico_explorer_showcase.rs b/boards/pico-explorer/examples/pico_explorer_showcase.rs similarity index 100% rename from boards/pico_explorer/examples/pico_explorer_showcase.rs rename to boards/pico-explorer/examples/pico_explorer_showcase.rs diff --git a/boards/pico_explorer/src/lib.rs b/boards/pico-explorer/src/lib.rs similarity index 100% rename from boards/pico_explorer/src/lib.rs rename to boards/pico-explorer/src/lib.rs diff --git a/boards/pico-lipo-16mb/CHANGELOG.md b/boards/pico-lipo-16mb/CHANGELOG.md new file mode 100644 index 0000000..28845e4 --- /dev/null +++ b/boards/pico-lipo-16mb/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/pico-lipo-16mb-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/pico-lipo-16mb-v0.1.0 diff --git a/boards/pico_lipo_16mb/Cargo.toml b/boards/pico-lipo-16mb/Cargo.toml similarity index 75% rename from boards/pico_lipo_16mb/Cargo.toml rename to boards/pico-lipo-16mb/Cargo.toml index e834c9a..ac688b9 100644 --- a/boards/pico_lipo_16mb/Cargo.toml +++ b/boards/pico-lipo-16mb/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "pico_lipo_16_mb" +name = "pico-lipo-16mb" 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" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/pico-lipo-16mb" +description = "Board Support Package for the Pico LiPo 16MB" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/pico_lipo_16mb/README.md b/boards/pico-lipo-16mb/README.md similarity index 90% rename from boards/pico_lipo_16mb/README.md rename to boards/pico-lipo-16mb/README.md index c1a3317..e3f709d 100644 --- a/boards/pico_lipo_16mb/README.md +++ b/boards/pico-lipo-16mb/README.md @@ -1,4 +1,4 @@ -# [pico_lipo_16mb] - Board Support for the [Pimoroni Pico Lipo 16MB] +# [pico-lipo-16mb] - Board Support for the [Pimoroni Pico Lipo 16MB] You should include this crate if you are writing code that you want to run on a [Pimoroni Pico Lipo 16MB] - a board with USB-C, STEMMA QT/Qwiic connectors, @@ -11,14 +11,14 @@ Note that if you use this crate the compiler will expect the full 16MB flash space, and so it may not work if you only have the 4MB variant. [Pimoroni Pico Lipo 16MB]: https://shop.pimoroni.com/products/pimoroni-pico-lipo?variant=39335427080275 -[pico_lipo_16mb]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico_lipo_16mb +[pico-lipo-16mb]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico-lipo-16mb ## Using To use this crate, your `Cargo.toml` file should contain: ```toml -pico_lipo_16mb = { git = "https://github.com/rp-rs/rp-hal.git" } +pico-lipo-16mb = { git = "https://github.com/rp-rs/rp-hal.git" } ``` In your program, you will need to call `pico_lipo_16mb::Pins::new` to create @@ -32,7 +32,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/pico_lipo_16mb $ cargo build --release --example +rp-hal/boards/pico-lipo-16mb $ cargo build --release --example ``` You will get an ELF file called @@ -46,7 +46,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/pico_lipo_16mb $ cargo run --release --example +rp-hal/boards/pico-lipo-16mb $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs b/boards/pico-lipo-16mb/examples/pico_lipo_16mb_blinky.rs similarity index 93% rename from boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs rename to boards/pico-lipo-16mb/examples/pico_lipo_16mb_blinky.rs index f5e7a8c..48a1059 100644 --- a/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs +++ b/boards/pico-lipo-16mb/examples/pico_lipo_16mb_blinky.rs @@ -24,15 +24,15 @@ use embedded_time::rate::*; use panic_halt as _; // Pull in any important traits -use pico_lipo_16_mb::hal::prelude::*; +use pico_lipo_16mb::hal::prelude::*; // A shorter alias for the Peripheral Access Crate, which provides low-level // register access -use pico_lipo_16_mb::hal::pac; +use pico_lipo_16mb::hal::pac; // A shorter alias for the Hardware Abstraction Layer, which provides // higher-level drivers. -use pico_lipo_16_mb::hal; +use pico_lipo_16mb::hal; /// Entry point to our bare-metal application. /// @@ -54,7 +54,7 @@ fn main() -> ! { // // The default is to generate a 125 MHz system clock let clocks = hal::clocks::init_clocks_and_plls( - pico_lipo_16_mb::XOSC_CRYSTAL_FREQ, + pico_lipo_16mb::XOSC_CRYSTAL_FREQ, pac.XOSC, pac.CLOCKS, pac.PLL_SYS, @@ -73,7 +73,7 @@ fn main() -> ! { let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board - let pins = pico_lipo_16_mb::Pins::new( + let pins = pico_lipo_16mb::Pins::new( pac.IO_BANK0, pac.PADS_BANK0, sio.gpio_bank0, diff --git a/boards/pico_lipo_16mb/src/lib.rs b/boards/pico-lipo-16mb/src/lib.rs similarity index 100% rename from boards/pico_lipo_16mb/src/lib.rs rename to boards/pico-lipo-16mb/src/lib.rs diff --git a/boards/pico/CHANGELOG.md b/boards/pico/CHANGELOG.md new file mode 100644 index 0000000..21c6bcf --- /dev/null +++ b/boards/pico/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/pico-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/pico-v0.1.0 diff --git a/boards/pico/Cargo.toml b/boards/pico/Cargo.toml index 066db5f..0a9c60a 100644 --- a/boards/pico/Cargo.toml +++ b/boards/pico/Cargo.toml @@ -3,9 +3,10 @@ name = "pico" version = "0.1.0" authors = ["evan "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/pico" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/pico" description = "Board Support Package for the Raspberry Pi Pico" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -20,19 +21,6 @@ usbd-serial = "0.1.1" usbd-hid = "0.5.1" futures = { version = "0.3", default-features = false, optional = true } -[dependencies.embassy] -git = "https://github.com/embassy-rs/embassy" -rev = "6d6e6f55b8a9ecd38b5a6d3bb11f74b2654afdeb" -optional = true - -# namespaced features will let use use "dep:embassy-traits" in the features rather than using this -# trick of renaming the crate. -[dependencies.embassy_traits] -git = "https://github.com/embassy-rs/embassy" -rev = "6d6e6f55b8a9ecd38b5a6d3bb11f74b2654afdeb" -package = "embassy-traits" -optional = true - [dev-dependencies] panic-halt= "0.2.0" embedded-hal ="0.2.5" @@ -44,8 +32,3 @@ i2c-pio = { git = "https://github.com/ithinuel/i2c-pio-rs", rev = "df06e4ac94a5b default = ["boot2", "rt"] boot2 = ["rp2040-boot2"] rt = ["cortex-m-rt","rp2040-hal/rt"] -embassy-traits = ["futures", "embassy", "embassy_traits"] - -[[example]] -name = "pico_i2c_controller_peripheral" -required-features = ["embassy-traits"] diff --git a/boards/pico/README.md b/boards/pico/README.md index 5470fb4..72c9003 100644 --- a/boards/pico/README.md +++ b/boards/pico/README.md @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the Pico. To use this crate, your `Cargo.toml` file should contain: ```toml -pico = { git = "https://github.com/rp-rs/rp-hal.git" } +pico = "0.1.0" ``` In your program, you will need to call `pico::Pins::new` to create diff --git a/boards/pico/examples/pico_i2c_controller_peripheral/controller.rs b/boards/pico/examples/pico_i2c_controller_peripheral/controller.rs deleted file mode 100644 index 5c2ad2e..0000000 --- a/boards/pico/examples/pico_i2c_controller_peripheral/controller.rs +++ /dev/null @@ -1,47 +0,0 @@ -//! I2C Controller demo -//! -//! This module implements a demonstration of an I2C controller sending read & write requests to a -//! peripheral. -//! This demo takes advandage of rust's async.await support to run read & write operation while -//! serving those request from an independant context. - -use super::ADDRESS; -use core::ops::Deref; -use rp2040_hal::i2c::I2C; -use rp2040_hal::pac::i2c0::RegisterBlock as I2CBlock; - -use embassy_traits::i2c::I2c; - -/// Controller demo -pub async fn run_demo(i2c: &mut I2C) -> Result<(), rp2040_hal::i2c::Error> -where - Block: Deref, -{ - let mut tx_filler = 0; - let mut tx = [0u8; 24]; - let mut rx = [0u8; 24]; - - i2c.read(ADDRESS, &mut rx).await?; - rx.iter() - .cloned() - .zip(0x80..) - .for_each(|(a, b)| assert_eq!(a, b)); - - tx.iter_mut().for_each(|b| { - *b = tx_filler; - tx_filler += 1; - }); - - i2c.write_read(ADDRESS, &tx, &mut rx).await?; - rx.iter() - .cloned() - .zip(0x80 + 24..) // follows the inital read - .for_each(|(a, b)| assert_eq!(a, b)); - - tx.iter_mut().for_each(|b| { - *b = tx_filler; - tx_filler += 1; - }); - i2c.write(ADDRESS, &tx).await?; - Ok(()) -} diff --git a/boards/pico/examples/pico_i2c_controller_peripheral/main.rs b/boards/pico/examples/pico_i2c_controller_peripheral/main.rs deleted file mode 100644 index 9ae2471..0000000 --- a/boards/pico/examples/pico_i2c_controller_peripheral/main.rs +++ /dev/null @@ -1,119 +0,0 @@ -//! I2C controller and I2C peripheral async demo. -//! -//! This example demonstrates use of both I2C peripherals (I2C0 and I2C1) at the same time on a single Pico using [Embassy](https://github.com/embassy-rs/embassy), an async executor. -//! -//! Each peripheral is passed to an async task, which allows them to operate independently of each other: -//! - The controller task (ctrl_demo) uses I2C0. It calls the demo controller code in `controller.rs` -//! - The peripheral task (prph_demo) uses I2C1. It calls the demo peripheral code in `peripheral.rs` -//! -//! ### Wiring notes: -//! -//! I2C0 uses pin `GP0` for `SDA`, and `GP1` for `SCL`. -//! -//! I2C1 uses `GP2` for `SDA`, and `GP3` for `SCL`. -//! -//! For this demo to function you must connect the `SDA` signals (`GP0` and `GP2`) to each other using wires. -//! You must also connect the `SCL` signals (`GP1` and `GP3`) to each other. -//! -//! A pull up resistor (to 3.3V, which is available on pin `36`) is required on SCL & SDA lines in order to reach the expected 1MHz. Although it -//! depends on the hardware context (wire length, impedance & capacitance), a typical value of 2KOhm -//! should generally work fine. -//! -//! If you do not connect the resistor and instead use the internal pull-ups on the I2C pins, you may need to lower the I2C frequency to avoid transmission errors. -#![no_std] -#![no_main] -#![feature(type_alias_impl_trait)] - -use embassy::{executor::Executor, util::Forever}; -use embedded_time::rate::Extensions; -use hal::{ - clocks::{init_clocks_and_plls, Clock}, - gpio::{bank0, FunctionI2C, Pin}, - i2c::{peripheral::I2CPeripheralEventIterator, I2C}, - pac, - watchdog::Watchdog, - Sio, -}; -use pico::{hal, Pins, XOSC_CRYSTAL_FREQ}; - -use panic_halt as _; - -mod controller; -mod peripheral; - -const ADDRESS: u16 = 0x55; - -#[embassy::task] -async fn ctrl_demo( - mut i2c: I2C< - pac::I2C0, - ( - Pin, - Pin, - ), - >, -) { - controller::run_demo(&mut i2c).await.expect("Demo failed") -} - -#[embassy::task] -async fn prph_demo( - mut i2c: I2CPeripheralEventIterator< - pac::I2C1, - ( - Pin, - Pin, - ), - >, -) { - peripheral::run_demo(&mut i2c).await.expect("Demo failed") -} - -#[cortex_m_rt::entry] -fn main() -> ! { - let mut pac = pac::Peripherals::take().unwrap(); - let mut watchdog = Watchdog::new(pac.WATCHDOG); - - let clocks = init_clocks_and_plls( - XOSC_CRYSTAL_FREQ, - pac.XOSC, - pac.CLOCKS, - pac.PLL_SYS, - pac.PLL_USB, - &mut pac.RESETS, - &mut watchdog, - ) - .ok() - .unwrap(); - - let pins = Pins::new( - pac.IO_BANK0, - pac.PADS_BANK0, - Sio::new(pac.SIO).gpio_bank0, - &mut pac.RESETS, - ); - let i2c0 = I2C::new_controller( - pac.I2C0, - pins.gpio0.into_mode(), - pins.gpio1.into_mode(), - 1_000.kHz(), - &mut pac.RESETS, - clocks.system_clock.freq(), - ); - - let i2c1 = I2C::new_peripheral_event_iterator( - pac.I2C1, - pins.gpio2.into_mode(), - pins.gpio3.into_mode(), - &mut pac.RESETS, - ADDRESS, - ); - - static EXECUTOR: Forever = Forever::new(); - let executor = EXECUTOR.put(Executor::new()); - - executor.run(|spawner| { - spawner.spawn(ctrl_demo(i2c0)).unwrap(); - spawner.spawn(prph_demo(i2c1)).unwrap(); - }); -} diff --git a/boards/pico/examples/pico_i2c_controller_peripheral/peripheral.rs b/boards/pico/examples/pico_i2c_controller_peripheral/peripheral.rs deleted file mode 100644 index eb2cc43..0000000 --- a/boards/pico/examples/pico_i2c_controller_peripheral/peripheral.rs +++ /dev/null @@ -1,95 +0,0 @@ -//! I2C Peripheral demo -//! -//! This module implements a state machine serving the I2C requests from the controller in this -//! demo. In a real-life application the state machine may not need to be validated as thoroughly -//! demonstrated here. - -use core::ops::Deref; -use rp2040_hal::i2c::peripheral::I2CEvent; -use rp2040_hal::i2c::peripheral::I2CPeripheralEventIterator; -use rp2040_hal::pac::i2c0::RegisterBlock as I2CBlock; - -pub async fn run_demo( - i2c: &mut I2CPeripheralEventIterator, -) -> Result<(), rp2040_hal::i2c::Error> -where - Block: Deref, -{ - let mut expected_value = 0..; - let mut output = 128; - - #[derive(Debug, PartialEq)] - enum Stage { - Idle0, - FirstRead, - Idle1, - FirstWrite, - SecondRead, - Idle2, - SecondWrite, - Done, - } - let mut stage = Stage::Idle0; - - while stage != Stage::Done { - let ev = futures::future::poll_fn(|cx| { - cx.waker().wake_by_ref(); - i2c.next() - .map(core::task::Poll::Ready) - .unwrap_or(core::task::Poll::Pending) - }) - .await; - match ev { - I2CEvent::Start => { - stage = match stage { - Stage::Idle0 => Stage::FirstRead, - Stage::Idle1 => Stage::FirstWrite, - Stage::Idle2 => Stage::SecondWrite, - _ => panic!("Unexpected {:?} while in {:?}", ev, stage), - } - } - I2CEvent::TransferRead => { - if stage != Stage::FirstRead && stage != Stage::SecondRead { - panic!("Unexpected {:?} while in {:?}", ev, stage); - } - - i2c.write(&[output, output + 1, output + 2, output + 3]); - output += 4; - } - I2CEvent::TransferWrite => { - if stage != Stage::FirstWrite && stage != Stage::SecondWrite { - panic!("Unexpected {:?} while in {:?}", ev, stage); - } - - let mut buf = [0; 16]; - loop { - let read = i2c.read(&mut buf); - if read == 0 { - break; - } - - buf.iter() - .take(read) - .cloned() - .zip(&mut expected_value) - .for_each(|(a, b)| assert_eq!(a, b)); - } - } - I2CEvent::Stop => { - stage = match stage { - Stage::FirstRead => Stage::Idle1, - Stage::SecondRead => Stage::Idle2, - Stage::SecondWrite => Stage::Done, - _ => panic!("Unexpected {:?} while in {:?}", ev, stage), - } - } - I2CEvent::Restart => { - stage = match stage { - Stage::FirstWrite => Stage::SecondRead, - _ => panic!("Unexpected {:?} while in {:?}", ev, stage), - } - } - } - } - Ok(()) -} diff --git a/boards/pro-micro-rp2040/CHANGELOG.md b/boards/pro-micro-rp2040/CHANGELOG.md new file mode 100644 index 0000000..b7babda --- /dev/null +++ b/boards/pro-micro-rp2040/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/pro-micro-rp2040-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/pro-micro-rp2040-v0.1.0 diff --git a/boards/pro_micro_rp2040/Cargo.toml b/boards/pro-micro-rp2040/Cargo.toml similarity index 85% rename from boards/pro_micro_rp2040/Cargo.toml rename to boards/pro-micro-rp2040/Cargo.toml index 053cc38..e719053 100644 --- a/boards/pro_micro_rp2040/Cargo.toml +++ b/boards/pro-micro-rp2040/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "pro_micro_rp2040" +name = "pro-micro-rp2040" version = "0.1.0" authors = ["Wilfried Chauveau "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/pro_micro_rp2040" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/pro-micro-rp2040" description = "Board Support Package for the Sparkfun Pro Micro RP2040" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/pro_micro_rp2040/README.md b/boards/pro-micro-rp2040/README.md similarity index 88% rename from boards/pro_micro_rp2040/README.md rename to boards/pro-micro-rp2040/README.md index 60abd8c..3682245 100644 --- a/boards/pro_micro_rp2040/README.md +++ b/boards/pro-micro-rp2040/README.md @@ -1,13 +1,14 @@ -# [pro_micro_rp2040] - Board Support for the [Sparkfun Pro Micro RP2040] +# [pro-micro-rp2040] - Board Support for the [Sparkfun Pro Micro RP2040] You should include this crate if you are writing code that you want to run on -a [Sparkfun Pro Micro RP2040] - a smaller [RP2040][Raspberry Silicon RP2040] board with USB-C and a WS2812B addressable LED. +a [Sparkfun Pro Micro RP2040] - a smaller [RP2040][Raspberry Silicon RP2040] +board with USB-C and a WS2812B addressable LED. This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the Pro Micro RP2040. [Sparkfun Pro Micro RP2040]: https://www.sparkfun.com/products/18288 -[pro_micro_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/pro_micro_rp2040 +[pro-micro-rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/pro-micro-rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -16,7 +17,7 @@ RP2040 chip according to how it is connected up on the Pro Micro RP2040. To use this crate, your `Cargo.toml` file should contain: ```toml -pro_micro_rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } +pro-micro-rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } ``` In your program, you will need to call `pro_micro_rp2040::Pins::new` to create @@ -30,7 +31,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/pro_micro_rp2040 $ cargo build --release --example +rp-hal/boards/pro-micro-rp2040 $ cargo build --release --example ``` You will get an ELF file called @@ -44,7 +45,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/pro_micro_rp2040 $ cargo run --release --example +rp-hal/boards/pro-micro-rp2040 $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs b/boards/pro-micro-rp2040/examples/pro_micro_rainbow.rs similarity index 100% rename from boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs rename to boards/pro-micro-rp2040/examples/pro_micro_rainbow.rs diff --git a/boards/pro_micro_rp2040/src/lib.rs b/boards/pro-micro-rp2040/src/lib.rs similarity index 100% rename from boards/pro_micro_rp2040/src/lib.rs rename to boards/pro-micro-rp2040/src/lib.rs diff --git a/boards/qt-py-rp2040/CHANGELOG.md b/boards/qt-py-rp2040/CHANGELOG.md new file mode 100644 index 0000000..230354d --- /dev/null +++ b/boards/qt-py-rp2040/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- None + +### Changed + +- None + +## [0.1.0] - 2021-12-20 + +- Initial release + +[Unreleased]: https://github.com/rp-rs/rp-hal/compare/qt-py-rp2040-v0.1.0...HEAD +[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/qt-py-rp2040-v0.1.0 diff --git a/boards/qt_py_rp2040/Cargo.toml b/boards/qt-py-rp2040/Cargo.toml similarity index 85% rename from boards/qt_py_rp2040/Cargo.toml rename to boards/qt-py-rp2040/Cargo.toml index d4aee7c..24a70aa 100644 --- a/boards/qt_py_rp2040/Cargo.toml +++ b/boards/qt-py-rp2040/Cargo.toml @@ -1,11 +1,12 @@ [package] -name = "qt_py_rp2040" +name = "qt-py-rp2040" version = "0.1.0" authors = ["Stephen Onnen "] edition = "2018" -homepage = "https://github.com/rp-rs/rp-hal/boards/qt_py_rp2040" +homepage = "https://github.com/rp-rs/rp-hal/tree/main/boards/qt-py-rp2040" description = "Board Support Package for the Adafruit QT Py RP2040" license = "MIT OR Apache-2.0" +repository = "https://github.com/rp-rs/rp-hal.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/boards/qt_py_rp2040/README.md b/boards/qt-py-rp2040/README.md similarity index 90% rename from boards/qt_py_rp2040/README.md rename to boards/qt-py-rp2040/README.md index 32f5489..5f27773 100644 --- a/boards/qt_py_rp2040/README.md +++ b/boards/qt-py-rp2040/README.md @@ -1,4 +1,4 @@ -# [qt_py_rp2040] - Board Support for the [Adafruit QT Py RP2040] +# [qt-py-rp2040] - Board Support for the [Adafruit QT Py RP2040] You should include this crate if you are writing code that you want to run on an [Adafruit QT Py RP2040] - an extremely small form-factor RP2040 board from Adafruit. @@ -7,7 +7,7 @@ This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the QT Py. [Adafruit QT Py RP2040]: https://www.adafruit.com/product/4900 -[qt_py_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/qt_py_rp2040 +[qt-py-rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/qt-py-rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal [Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ @@ -16,7 +16,7 @@ RP2040 chip according to how it is connected up on the QT Py. To use this crate, your `Cargo.toml` file should contain: ```toml -qt_py_rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } +qt-py-rp2040 = { git = "https://github.com/rp-rs/rp-hal.git" } ``` In your program, you will need to call `qt_py_rp2040::Pins::new` to create @@ -30,7 +30,7 @@ devices. See the [examples](./examples) folder for more details. To compile an example, clone the _rp-hal_ repository and run: ```console -rp-hal/boards/qt_py_rp2040 $ cargo build --release --example +rp-hal/boards/qt-py-rp2040 $ cargo build --release --example ``` You will get an ELF file called @@ -44,7 +44,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into bootloader mode and run: ```console -rp-hal/boards/qt_py_rp2040 $ cargo run --release --example +rp-hal/boards/qt-py-rp2040 $ cargo run --release --example ``` If you get an error about not being able to find `elf2uf2-rs`, try: diff --git a/boards/qt_py_rp2040/examples/qt_py_rainbow.rs b/boards/qt-py-rp2040/examples/qt_py_rainbow.rs similarity index 100% rename from boards/qt_py_rp2040/examples/qt_py_rainbow.rs rename to boards/qt-py-rp2040/examples/qt_py_rainbow.rs diff --git a/boards/qt_py_rp2040/src/lib.rs b/boards/qt-py-rp2040/src/lib.rs similarity index 100% rename from boards/qt_py_rp2040/src/lib.rs rename to boards/qt-py-rp2040/src/lib.rs