esp32c6/atomic/
addr_lock.rs1#[doc = "Register `ADDR_LOCK` reader"]
2pub type R = crate::R<ADDR_LOCK_SPEC>;
3#[doc = "Register `ADDR_LOCK` writer"]
4pub type W = crate::W<ADDR_LOCK_SPEC>;
5#[doc = "Field `LOCK` reader - read to acquire hardware lock, write to release hardware lock"]
6pub type LOCK_R = crate::FieldReader;
7#[doc = "Field `LOCK` writer - read to acquire hardware lock, write to release hardware lock"]
8pub type LOCK_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9impl R {
10 #[doc = "Bits 0:1 - read to acquire hardware lock, write to release hardware lock"]
11 #[inline(always)]
12 pub fn lock(&self) -> LOCK_R {
13 LOCK_R::new((self.bits & 3) as u8)
14 }
15}
16#[cfg(feature = "impl-register-debug")]
17impl core::fmt::Debug for R {
18 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19 f.debug_struct("ADDR_LOCK")
20 .field("lock", &self.lock())
21 .finish()
22 }
23}
24impl W {
25 #[doc = "Bits 0:1 - read to acquire hardware lock, write to release hardware lock"]
26 #[inline(always)]
27 pub fn lock(&mut self) -> LOCK_W<ADDR_LOCK_SPEC> {
28 LOCK_W::new(self, 0)
29 }
30}
31#[doc = "hardware lock regsiter\n\nYou can [`read`](crate::Reg::read) this register and get [`addr_lock::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addr_lock::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct ADDR_LOCK_SPEC;
33impl crate::RegisterSpec for ADDR_LOCK_SPEC {
34 type Ux = u32;
35}
36#[doc = "`read()` method returns [`addr_lock::R`](R) reader structure"]
37impl crate::Readable for ADDR_LOCK_SPEC {}
38#[doc = "`write(|w| ..)` method takes [`addr_lock::W`](W) writer structure"]
39impl crate::Writable for ADDR_LOCK_SPEC {
40 type Safety = crate::Unsafe;
41}
42#[doc = "`reset()` method sets ADDR_LOCK to value 0"]
43impl crate::Resettable for ADDR_LOCK_SPEC {}