diff --git a/esp-hal/src/rtc_cntl/sleep/esp32c3.rs b/esp-hal/src/rtc_cntl/sleep/esp32c3.rs index 632296185e9..0878a11f497 100644 --- a/esp-hal/src/rtc_cntl/sleep/esp32c3.rs +++ b/esp-hal/src/rtc_cntl/sleep/esp32c3.rs @@ -434,19 +434,10 @@ fn rtc_sleep_pu(val: bool) { }); } - if val { - fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().set_bit()); - } else { - fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().clear_bit()); - } + fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().bit(val)); - if val { - fe2.tx_interp_ctrl() - .modify(|_, w| w.tx_inf_force_pu().set_bit()); - } else { - fe2.tx_interp_ctrl() - .modify(|_, w| w.tx_inf_force_pu().clear_bit()); - } + fe2.tx_interp_ctrl() + .modify(|_, w| w.tx_inf_force_pu().bit(val)); syscon.mem_power_up().modify(|_r, w| unsafe { w.sram_power_up() diff --git a/esp-hal/src/rtc_cntl/sleep/esp32s3.rs b/esp-hal/src/rtc_cntl/sleep/esp32s3.rs index 3dddc059dba..9e7c0de069d 100644 --- a/esp-hal/src/rtc_cntl/sleep/esp32s3.rs +++ b/esp-hal/src/rtc_cntl/sleep/esp32s3.rs @@ -379,19 +379,10 @@ fn rtc_sleep_pu(val: bool) { }); } - if val { - fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().set_bit()); - } else { - fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().clear_bit()); - } + fe.gen_ctrl().modify(|_, w| w.iq_est_force_pu().bit(val)); - if val { - fe2.tx_interp_ctrl() - .modify(|_, w| w.tx_inf_force_pu().set_bit()); - } else { - fe2.tx_interp_ctrl() - .modify(|_, w| w.tx_inf_force_pu().clear_bit()); - } + fe2.tx_interp_ctrl() + .modify(|_, w| w.tx_inf_force_pu().bit(val)); syscon.mem_power_up().modify(|_r, w| unsafe { w.sram_power_up() diff --git a/examples/src/bin/wifi_dhcp.rs b/examples/src/bin/wifi_dhcp.rs index 89f842da27d..72183c5ece8 100644 --- a/examples/src/bin/wifi_dhcp.rs +++ b/examples/src/bin/wifi_dhcp.rs @@ -41,8 +41,8 @@ use smoltcp::{ wire::{IpAddress, Ipv4Address}, }; -const SSID: &str = "EspressifSystems"; -const PASSWORD: &str = "Espressif32"; +const SSID: &str = env!("SSID"); +const PASSWORD: &str = env!("PASSWORD"); #[entry] fn main() -> ! {