Skip to content

Commit cc7dcef

Browse files
committed
fix: generic esp32 buttons fix
1 parent 8451583 commit cc7dcef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,22 +187,22 @@ async fn main(spawner: Spawner) {
187187
#[cfg(feature = "esp32")]
188188
let button_1 = Input::new(
189189
peripherals.GPIO27,
190-
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Down),
190+
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Up),
191191
);
192192
#[cfg(feature = "esp32")]
193193
let button_2 = Input::new(
194194
peripherals.GPIO26,
195-
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Down),
195+
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Up),
196196
);
197197
#[cfg(feature = "esp32")]
198198
let button_3 = Input::new(
199199
peripherals.GPIO33,
200-
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Down),
200+
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Up),
201201
);
202202
#[cfg(feature = "esp32")]
203203
let button_4 = Input::new(
204204
peripherals.GPIO32,
205-
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Down),
205+
esp_hal::gpio::InputConfig::default().with_pull(esp_hal::gpio::Pull::Up),
206206
);
207207

208208
#[cfg(feature = "esp32c3")]

0 commit comments

Comments
 (0)