mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-30 05:41:12 +00:00
Get rid of the riscv-ulp-hal feature
This commit is contained in:
parent
f986f713e8
commit
8dd77e6635
@ -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::<
|
||||
|
Loading…
x
Reference in New Issue
Block a user