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

Something broke in f11c18a6b93eb54e02494fa4df2a2941dcd5b44f #2263

Closed
bjoernQ opened this issue Oct 2, 2024 · 2 comments · Fixed by #2265
Closed

Something broke in f11c18a6b93eb54e02494fa4df2a2941dcd5b44f #2263

bjoernQ opened this issue Oct 2, 2024 · 2 comments · Fixed by #2265
Labels
status:needs-attention This should be prioritized
Milestone

Comments

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 2, 2024

Commit f11c18a broke something

Here is the repro: https://github.com/bjoernQ/rust-esp32s3-ili9341/blob/borked/

The commit before works

@bjoernQ bjoernQ added the status:needs-attention This should be prioritized label Oct 2, 2024
@bjoernQ bjoernQ added this to the 0.21.0 milestone Oct 2, 2024
@bjoernQ
Copy link
Contributor Author

bjoernQ commented Oct 2, 2024

Minimal repro:

//! Blinks an LED
//!
//! The following wiring is assumed:
//! - LED => GPIO0

//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3


#![no_std]
#![no_main]

use esp_backtrace as _;
use esp_hal::{
    delay::Delay,
    gpio::{Io, Level, Output},
    prelude::*,
};

#[entry]
fn main() -> ! {
    let peripherals = esp_hal::init(esp_hal::Config::default());

    // Set GPIO0 as an output, and set its state high initially.
    let io = Io::new(peripherals.GPIO, peripherals.IO_MUX);
    let mut led = Output::new(io.pins.gpio4, Level::High);

    let delay = Delay::new();

    loop {
        set(&mut led, true);
        delay.delay_millis(50);
        set(&mut led, false);
        delay.delay_millis(50);
    }
}

fn set<T>(pin: &mut T, state: bool) where T: embedded_hal_02::digital::v2::OutputPin {
    if state {
        pin.set_high().ok();
    } else {
        pin.set_low().ok();
    }
}

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Oct 2, 2024

The level stays high in the example - eh1.0 seems to be fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-attention This should be prioritized
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant