Skip to content

Commit 2cf8647

Browse files
committed
some compile fixes
1 parent e009f90 commit 2cf8647

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

esp-hal-smartled/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ esp-backtrace = { version = "0.14.2", features = [
2525
"panic-handler",
2626
"println",
2727
] }
28-
esp-println = { version = "0.12.0"}
28+
esp-println = "0.12.0"
2929
smart-leds = "0.4.0"
3030

3131
[features]

esp-hal-smartled/examples/hello_rgb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#![no_main]
2424

2525
use esp_backtrace as _;
26-
use esp_hal::{delay::Delay, gpio::Io, prelude::*, rmt::Rmt};
26+
use esp_hal::{delay::Delay, prelude::*, rmt::Rmt};
2727
use esp_hal_smartled::{smart_led_buffer, SmartLedsAdapter};
2828
use smart_leds::{
2929
brightness, gamma,

esp-hal-smartled/src/lib.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ impl From<RmtError> for LedAdapterError {
6262

6363
fn led_pulses_for_clock(src_clock: u32) -> (u32, u32) {
6464
(
65-
u32::from(PulseCode {
66-
level1: true,
67-
length1: ((SK68XX_T0H_NS * src_clock) / 1000) as u16,
68-
level2: false,
69-
length2: ((SK68XX_T0L_NS * src_clock) / 1000) as u16,
70-
}),
71-
u32::from(PulseCode {
72-
level1: true,
73-
length1: ((SK68XX_T1H_NS * src_clock) / 1000) as u16,
74-
level2: false,
75-
length2: ((SK68XX_T1L_NS * src_clock) / 1000) as u16,
76-
}),
65+
PulseCode::new(
66+
true,
67+
((SK68XX_T0H_NS * src_clock) / 1000) as u16,
68+
false,
69+
((SK68XX_T0L_NS * src_clock) / 1000) as u16,
70+
),
71+
PulseCode::new(
72+
true,
73+
((SK68XX_T1H_NS * src_clock) / 1000) as u16,
74+
false,
75+
((SK68XX_T1L_NS * src_clock) / 1000) as u16,
76+
),
7777
)
7878
}
7979

@@ -229,9 +229,9 @@ pub mod asynch {
229229
use super::*;
230230
use esp_hal::{
231231
clock::Clocks,
232-
gpio::PeripheralOutput,
232+
gpio::OutputPin,
233233
peripheral::Peripheral,
234-
rmt::{asynch::TxChannelAsync, TxChannelCreatorAsync},
234+
rmt::{TxChannelAsync, TxChannelCreatorAsync},
235235
};
236236

237237
/// Function to calculate the required RMT buffer size for a given number of LEDs when using
@@ -257,7 +257,7 @@ pub mod asynch {
257257
rmt_buffer: [u32; BUFFER_SIZE],
258258
) -> SmartLedAdapterAsync<Tx, BUFFER_SIZE>
259259
where
260-
O: PeripheralOutput + 'd,
260+
O: OutputPin + 'd,
261261
C: TxChannelCreatorAsync<'d, Tx, O>,
262262
{
263263
let channel = channel.configure(pin, led_config()).unwrap();

0 commit comments

Comments
 (0)