Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 30, 2024
1 parent 8015ea7 commit f170a8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion esp-hal/src/etm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions examples/src/bin/etm_blinky_systimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use esp_backtrace as _;
use esp_hal::{
etm::Etm,
gpio::{
etm::{GpioEtmChannels, GpioEtmOutputConfig},
etm::{Channels, OutputConfig},
Io,
Level,
Pull,
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions examples/src/bin/etm_gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -33,18 +33,18 @@ 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,
},
);
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;
Expand Down

0 comments on commit f170a8e

Please sign in to comment.