Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around circular dependencies for ws2812-pio #353

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ rp2040-hal = { path ="./rp2040-hal" }

[patch.crates-io]
rp2040-hal = { path ="./rp2040-hal" }

[patch.'https://github.com/ithinuel/ws2812-pio-rs.git']
ws2812-pio = { path ="./vendor/ws2812-pio" }
2 changes: 1 addition & 1 deletion boards/adafruit-feather-rp2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"

Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-itsy-bitsy-rp2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"

Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-kb2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0" }
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7.0", optional = true }
embedded-hal = { version = "0.2.4", features = ["unproven"] }
rp2040-boot2 = { version = "0.2.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-macropad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
[dev-dependencies]
embedded-time = "0.12.0"
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-qt-py-rp2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"
rp2040-boot2 = { version = "0.2.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-trinkey-qt2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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

[dependencies]
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0" }
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7.0", optional = true }
rp2040-boot2 = { version = "0.2.0", optional = true }

Expand Down
3 changes: 1 addition & 2 deletions boards/arduino_nano_connect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.3"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0" }
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7.0", optional = true }
embedded-hal = { version = "0.2.4", features = ["unproven"] }
panic-probe = { version = "0.2.0", features = ["print-defmt"] }
Expand Down Expand Up @@ -41,7 +41,6 @@ panic-halt= "0.2.0"
embedded-hal ="0.2.5"
cortex-m-rtic = "0.6.0-alpha.5"
nb = "1.0"
# i2c-pio = { git = "https://github.com/ithinuel/i2c-pio-rs", rev = "afc2dad0e955da2b712d7f7cd78c7af88ddc6a45" }

[features]
default = ["boot2", "rt"]
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-pico-explorer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-hal = { version = "0.2.4", features = ["unproven"] }
st7789 = "0.6.1"
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-pico-lipo-16mb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
rp2040-boot2 = { version = "0.2.0", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-plasma-2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"

Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-tiny2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"

Expand Down
3 changes: 1 addition & 2 deletions boards/rp-pico/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }
embedded-time = "0.12.0"
usb-device= "0.2.8"
Expand All @@ -26,7 +26,6 @@ panic-halt= "0.2.0"
embedded-hal ="0.2.5"
cortex-m-rtic = "0.6.0-rc.4"
nb = "1.0"
i2c-pio = { git = "https://github.com/ithinuel/i2c-pio-rs", rev = "fa155bbae4e8553b448a66cc47236db38b7524dd" }
heapless = "0.7.9"
embedded-sdmmc = { git = "https://github.com/rust-embedded-community/embedded-sdmmc-rs.git" }
smart-leds = "0.3.0"
Expand Down
156 changes: 0 additions & 156 deletions boards/rp-pico/examples/pico_i2c_pio.rs

This file was deleted.

2 changes: 1 addition & 1 deletion boards/solderparty-rp2040-stamp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"
[dependencies]
cortex-m = "0.7.2"
rp2040-boot2 = { version = "0.2.0", optional = true }
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0"}
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7", optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion boards/sparkfun-pro-micro-rp2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0" }
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7.0", optional = true }
embedded-hal = { version = "0.2.4", features = ["unproven"] }
rp2040-boot2 = { version = "0.2.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion boards/sparkfun-thing-plus-rp2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/rp-rs/rp-hal.git"

[dependencies]
cortex-m = "0.7.2"
rp2040-hal = { path = "../../rp2040-hal", version = "0.4.0" }
rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" }
cortex-m-rt = { version = "0.7.0", optional = true }
embedded-hal = { version = "0.2.4", features = ["unproven"] }
rp2040-boot2 = { version = "0.2.0", optional = true }
Expand Down
29 changes: 27 additions & 2 deletions rp2040-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.0] - 2022-06-22

### MSRV

The Minimum-Supported Rust Version (MSRV) for this release is 1.61

### Added

- RP2040 specific #[entry] macro that releases spinlocks - @jannic
- Start multiple state machines in sync with each other - @astraw
- Unsafe fn for freeing all spinlocks when you can't use the RP2040 entry macro (eg RTIC) - @9names
- Optional feature for enabling defmt formatting for i2c errors - @ithinuel

### Changed

- Use thread send safe UART* marker when splitting, improves UART ergonmics - @marius-meissner
- Improve performance for hardware division instrinsics. Internal intrinsics cleanup - @Sizurka
- Provide a better alarm abstraction - @ithinuel
- Update Multicore::spawn to be able to take a closure without requiring alloc.
Improve Multicore ergonomics and add example for how to use new API - @Liamolucko
- Allow PIO program to be 32 instructions long, was previously limited to 31 - @jannic
- Fix Typos - @mqy

### Removed

- removed i2c embassy driver prototype
- I2c async driver. Use new one at https://github.com/ithinuel/rp2040-async-i2c/ - @ithinuel
- Unused fields from UartPeripheral and Reader - @jannic

## [0.4.0] - 2022-03-09

Expand Down Expand Up @@ -98,7 +122,8 @@ The Minimum-Supported Rust Version (MSRV) for this release is 1.54.

- Initial release

[Unreleased]: https://github.com/rp-rs/rp-hal/compare/v0.4.0...HEAD
[Unreleased]: https://github.com/rp-rs/rp-hal/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/rp-rs/rp-hal/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/rp-rs/rp-hal/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/rp-rs/rp-hal/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/rp-rs/rp-hal/compare/v0.1.0...v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion rp2040-hal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rp2040-hal"
version = "0.4.0"
version = "0.5.0"
authors = ["The rp-rs Developers"]
edition = "2018"
homepage = "https://github.com/rp-rs/rp-hal"
Expand Down
2 changes: 1 addition & 1 deletion rp2040-hal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ https://github.com/rp-rs/rp-hal/ for more details.
To include this crate in your project, amend your `Cargo.toml` file to include

```toml
rp2040-hal = "0.4.0"
rp2040-hal = "0.5.0"
```

To obtain a copy of the source code (e.g. if you want to propose a bug-fix or
Expand Down
1 change: 1 addition & 0 deletions vendor/ws2812-pio/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"files":{"Cargo.toml":"5b08ca6a9062cd01f73776893f3062a7ef3592abe93ad0b9d02661b57693c36c","LICENSE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","README.md":"bce8f6ef3d568df1391f63e6d76efbb37e35773e959224425663a8814272f093","src/lib.rs":"c5779e8114100f80668e9560a8742929f9c39e44764a1821062b0d64cca80d75"},"package":null}
19 changes: 19 additions & 0 deletions vendor/ws2812-pio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "ws2812-pio"
version = "0.2.0"
edition = "2018"
license = "Apache-2.0"
description = "Driver implementation for the WS2812 smart LED using the RP2040's PIO peripheral."
documentation = "https://docs.rs/ws2812-pio"
repository = "https://github.com/ithinuel/ws2812-pio-rs/"

[dependencies]
embedded-hal = "0.2.5"
embedded-time = "0.12.0"
rp2040-hal = { path = "../../rp2040-hal" }
pio = "0.2.0"
smart-leds-trait = "0.2.1"
nb = "1.0.0"
cortex-m = "0.7.3"

[workspace]
Loading