atsaml21e17b/pac/
statusb.rs1#[doc = "Register `STATUSB` reader"]
2pub struct R(crate::R<STATUSB_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STATUSB_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STATUSB_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STATUSB_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `USB_` reader - USB APB Protect Enable"]
17pub type USB__R = crate::BitReader<bool>;
18#[doc = "Field `DSU_` reader - DSU APB Protect Enable"]
19pub type DSU__R = crate::BitReader<bool>;
20#[doc = "Field `NVMCTRL_` reader - NVMCTRL APB Protect Enable"]
21pub type NVMCTRL__R = crate::BitReader<bool>;
22#[doc = "Field `MTB_` reader - MTB APB Protect Enable"]
23pub type MTB__R = crate::BitReader<bool>;
24impl R {
25 #[doc = "Bit 0 - USB APB Protect Enable"]
26 #[inline(always)]
27 pub fn usb_(&self) -> USB__R {
28 USB__R::new((self.bits & 1) != 0)
29 }
30 #[doc = "Bit 1 - DSU APB Protect Enable"]
31 #[inline(always)]
32 pub fn dsu_(&self) -> DSU__R {
33 DSU__R::new(((self.bits >> 1) & 1) != 0)
34 }
35 #[doc = "Bit 2 - NVMCTRL APB Protect Enable"]
36 #[inline(always)]
37 pub fn nvmctrl_(&self) -> NVMCTRL__R {
38 NVMCTRL__R::new(((self.bits >> 2) & 1) != 0)
39 }
40 #[doc = "Bit 3 - MTB APB Protect Enable"]
41 #[inline(always)]
42 pub fn mtb_(&self) -> MTB__R {
43 MTB__R::new(((self.bits >> 3) & 1) != 0)
44 }
45}
46#[doc = "Peripheral write protection status - Bridge B\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [statusb](index.html) module"]
47pub struct STATUSB_SPEC;
48impl crate::RegisterSpec for STATUSB_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [statusb::R](R) reader structure"]
52impl crate::Readable for STATUSB_SPEC {
53 type Reader = R;
54}
55#[doc = "`reset()` method sets STATUSB to value 0x02"]
56impl crate::Resettable for STATUSB_SPEC {
57 const RESET_VALUE: Self::Ux = 0x02;
58}