From f170a8e430bd448bb4a3e9b24a9ec5229eee26de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Wed, 30 Oct 2024 13:57:45 +0100 Subject: [PATCH] Fix examples --- esp-hal/src/etm.rs | 2 +- examples/src/bin/etm_blinky_systimer.rs | 6 +++--- examples/src/bin/etm_gpio.rs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/esp-hal/src/etm.rs b/esp-hal/src/etm.rs index a0b6fdd730a..a2da7f05e5c 100644 --- a/esp-hal/src/etm.rs +++ b/esp-hal/src/etm.rs @@ -34,7 +34,7 @@ //! let (button, _) = io.pins.gpio9.split(); //! //! // setup ETM -//! let gpio_ext = GpioEtmChannels::new(peripherals.GPIO_SD); +//! let gpio_ext = Channels::new(peripherals.GPIO_SD); //! let led_task = gpio_ext.channel0_task.toggle( //! led, //! OutputConfig { diff --git a/examples/src/bin/etm_blinky_systimer.rs b/examples/src/bin/etm_blinky_systimer.rs index afe20d18f47..65b141bfb51 100644 --- a/examples/src/bin/etm_blinky_systimer.rs +++ b/examples/src/bin/etm_blinky_systimer.rs @@ -12,7 +12,7 @@ use esp_backtrace as _; use esp_hal::{ etm::Etm, gpio::{ - etm::{GpioEtmChannels, GpioEtmOutputConfig}, + etm::{Channels, OutputConfig}, Io, Level, Pull, @@ -35,10 +35,10 @@ fn main() -> ! { let mut led = io.pins.gpio1; // setup ETM - let gpio_ext = GpioEtmChannels::new(peripherals.GPIO_SD); + let gpio_ext = Channels::new(peripherals.GPIO_SD); let led_task = gpio_ext.channel0_task.toggle( &mut led, - GpioEtmOutputConfig { + OutputConfig { open_drain: false, pull: Pull::None, initial_state: Level::High, diff --git a/examples/src/bin/etm_gpio.rs b/examples/src/bin/etm_gpio.rs index d508a120f07..1edbc8b6ca4 100644 --- a/examples/src/bin/etm_gpio.rs +++ b/examples/src/bin/etm_gpio.rs @@ -12,7 +12,7 @@ use esp_backtrace as _; use esp_hal::{ etm::Etm, gpio::{ - etm::{GpioEtmChannels, GpioEtmInputConfig, GpioEtmOutputConfig}, + etm::{Channels, InputConfig, OutputConfig}, Io, Level, Output, @@ -33,10 +33,10 @@ fn main() -> ! { let (button, _) = io.pins.gpio9.split(); // setup ETM - let gpio_ext = GpioEtmChannels::new(peripherals.GPIO_SD); + let gpio_ext = Channels::new(peripherals.GPIO_SD); let led_task = gpio_ext.channel0_task.toggle( led, - GpioEtmOutputConfig { + OutputConfig { open_drain: false, pull: Pull::None, initial_state: Level::Low, @@ -44,7 +44,7 @@ fn main() -> ! { ); let button_event = gpio_ext .channel0_event - .falling_edge(button, GpioEtmInputConfig { pull: Pull::Down }); + .falling_edge(button, InputConfig { pull: Pull::Down }); let etm = Etm::new(peripherals.SOC_ETM); let channel0 = etm.channel0;