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

Fix time-driver-timg timer1 #1091

Merged
merged 4 commits into from
Jan 17, 2024
Merged
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
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Set up interrupts for the DMA and async enabled peripherals only when `async` feature is provided (#1042)
- Update to `1.0.0` releases of the `embedded-hal-*` packages (#1068)
- Update `embassy-time` to `0.3.0` and embassy-executor to `0.5.0` release due to the release of the `embedded-hal-*` packages (#1075)

### Fixed

- ESP32: correct gpio 32/33 in errata36() (#1053)
- ESP32: make gpio 4 usable as analog pin (#1078)
- Fix double &mut for the `SetDutyCycle` impl on `PwmPin` (#1033)
- ESP32/ESP32-S3: Fix stack-top calculation for app-core (#1081)
- ESP32/ESP32-S2/ESP32-S3: Fix embassy-time-timg0 driver (#1091)

### Removed

Expand All @@ -40,7 +44,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fix SHA for all targets (#1021)
- Fix double &mut for the `SetDutyCycle` impl on `PwmPin` (#1033)

## [0.14.0] - 2023-12-12

Expand Down Expand Up @@ -71,7 +74,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated to latest release candidate (`1.0.0-rc.2`) for `embedded-hal{-async,-nb}` (#994)
- Explicit panic when hitting the `DefaultHandler` (#1005)
- Relevant interrupts are now auto enabled in `embassy::init` (#1014).
- Set up interrupts for the DMA and async enabled peripherals only when `async` feature is provided (#1042)

### Fixed

Expand All @@ -87,7 +89,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ESP32-H2: Fix used RAM (#1003)
- Fix SPI slave DMA dma\_read and dma\_write (#1013)
- ESP32-C6/H2: Fix disabling of interrupts (#1040)
- ESP32/ESP32-S3: Fix stack-top calculation for app-core (#1081)

### Removed

Expand Down
13 changes: 9 additions & 4 deletions esp-hal-common/src/embassy/time_driver_timg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use crate::{
clock::Clocks,
peripherals,
prelude::*,
timer::{Instance, Timer, Timer0},
timer::{Instance, Timer0, TimerGroup},
};

#[cfg(not(any(esp32, esp32s2, esp32s3)))]
pub const ALARM_COUNT: usize = 1;
#[cfg(any(esp32, esp32s2, esp32s3))]
pub const ALARM_COUNT: usize = 2;

pub type TimerType = Timer<Timer0<TIMG0>>;
pub type TimerType = TimerGroup<'static, TIMG0>;

pub struct EmbassyTimer {
pub(crate) alarms: Mutex<[AlarmState; ALARM_COUNT]>,
Expand Down Expand Up @@ -56,9 +56,14 @@ impl EmbassyTimer {
// set divider to get a 1mhz clock. APB (80mhz) / 80 = 1mhz...
// TODO: assert APB clock is the source and its at the correct speed for the
// divider
timer.set_divider(clocks.apb_clock.to_MHz() as u16);
timer.timer0.set_divider(clocks.apb_clock.to_MHz() as u16);
timer.timer0.set_counter_active(true);

timer.set_counter_active(true);
#[cfg(any(esp32, esp32s2, esp32s3))]
{
timer.timer1.set_divider(clocks.apb_clock.to_MHz() as u16);
timer.timer1.set_counter_active(true);
}

unwrap!(interrupt::enable(
peripherals::Interrupt::TG0_T0_LEVEL,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn main(spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

spawner.spawn(run()).ok();

Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);

Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);

Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);

Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_multicore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

// Set GPIO2 as an output, and set its state high initially.
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_multicore_interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn main() -> ! {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

// Set GPIO2 as an output, and set its state high initially.
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
7 changes: 2 additions & 5 deletions esp32-hal/examples/embassy_multiprio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ async fn main(low_prio_spawner: Spawner) {
let system = peripherals.SYSTEM.split();
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
}
let timer_group0 = esp32_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0);

let spawner = INT_EXECUTOR_0.start(Priority::Priority2);
spawner.must_spawn(high_prio());
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_rmt_rx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_rmt_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let mut uart0 = Uart::new(peripherals.UART0, &clocks);
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
let sclk = io.pins.gpio19;
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn main(_spawner: Spawner) {
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
// GPIO 0 as input
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

spawner.spawn(run()).ok();
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_multiprio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async fn main(low_prio_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let spawner = INT_EXECUTOR_0.start(Priority::Priority2);
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let mut uart0 = Uart::new(peripherals.UART0, &clocks);
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c2_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

spawner.spawn(run()).ok();
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_multiprio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async fn main(low_prio_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let spawner = INT_EXECUTOR_0.start(Priority::Priority2);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_rmt_rx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_rmt_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let mut uart0 = Uart::new(peripherals.UART0, &clocks);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_usb_serial_jtag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn main(_spawner: Spawner) -> ! {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let mut usb_serial = UsbSerialJtag::new(peripherals.USB_DEVICE);
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c3_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async fn main(spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

spawner.spawn(run()).ok();
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
embassy::init(
&clocks,
esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks).timer0,
esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks),
);

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_multiprio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async fn main(low_prio_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let spawner = INT_EXECUTOR_0.start(Priority::Priority2);
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-hal/examples/embassy_parl_io_rx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) {
#[cfg(feature = "embassy-time-timg0")]
{
let timer_group0 = esp32c6_hal::timer::TimerGroup::new(peripherals.TIMG0, &clocks);
embassy::init(&clocks, timer_group0.timer0);
embassy::init(&clocks, timer_group0);
}

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
Expand Down
Loading