Get rid of the riscv-ulp-hal feature

This commit is contained in:
ivmarkov 2024-01-18 20:22:57 +00:00
parent f986f713e8
commit 8dd77e6635

View File

@ -100,17 +100,6 @@ static TAKEN: core::sync::atomic::AtomicBool = core::sync::atomic::AtomicBool::n
static TAKEN_CS: crate::task::CriticalSection = crate::task::CriticalSection::new();
impl Peripherals {
pub fn take() -> Result<Self, crate::sys::EspError> {
if unsafe { TAKEN } {
panic!("Peripheral already taken")
} else {
unsafe {
TAKEN = true;
}
Ok(unsafe { Peripherals::new() })
}
}
pub fn take() -> Result<Self, crate::sys::EspError> {
if TAKEN.load(core::sync::atomic::Ordering::SeqCst) {
Err(crate::sys::EspError::from_infallible::<