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

Update documentation and smart-leds-trait dependency #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ documentation = "https://docs.rs/ws2812-pio"
repository = "https://github.com/rp-rs/ws2812-pio-rs/"

[dependencies]
embedded-hal = "0.2.5"
embedded-hal = "0.2.7"
fugit = "0.3.5"
rp2040-hal = "0.10"
pio = "0.2.0"
smart-leds-trait = "0.2.1"
smart-leds-trait = "0.3.0"
nb = "1.0.0"
cortex-m = "0.7.3"
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ use smart_leds_trait::SmartLedsWrite;
///
/// // Then you will make sure yourself to not write too frequently:
/// loop {
/// use smart_leds::{SmartLedsWrite, RGB8};
/// use smart_leds::RGB8;
/// use smart_leds_trait::SmartLedsWrite;
/// let color : RGB8 = (255, 0, 255).into();
///
/// ws.write([color].iter().copied()).unwrap();
Expand Down Expand Up @@ -166,7 +167,7 @@ where
/// PIO FIFO until all data has been transmitted to the LED chain.
fn write<T, J>(&mut self, iterator: T) -> Result<(), ()>
where
T: Iterator<Item = J>,
T: IntoIterator<Item = J>,
J: Into<Self::Color>,
{
for item in iterator {
Expand Down Expand Up @@ -204,7 +205,8 @@ where
/// );
///
/// loop {
/// use smart_leds::{SmartLedsWrite, RGB8};
/// use smart_leds::RGB8;
/// use smart_leds_trait::SmartLedsWrite;
/// let color : RGB8 = (255, 0, 255).into();
///
/// ws.write([color].iter().copied()).unwrap();
Expand Down Expand Up @@ -256,7 +258,7 @@ where
type Error = ();
fn write<T, J>(&mut self, iterator: T) -> Result<(), ()>
where
T: Iterator<Item = J>,
T: IntoIterator<Item = J>,
J: Into<Self::Color>,
{
self.driver.tx.clear_stalled_flag();
Expand Down
Loading