atsamd11c/dsu/
statusb.rs

1#[doc = "Register `STATUSB` reader"]
2pub type R = crate::R<StatusbSpec>;
3#[doc = "Field `PROT` reader - Protected"]
4pub type ProtR = crate::BitReader;
5#[doc = "Field `DBGPRES` reader - Debugger Present"]
6pub type DbgpresR = crate::BitReader;
7#[doc = "Field `DCCD0` reader - Debug Communication Channel 0 Dirty"]
8pub type Dccd0R = crate::BitReader;
9#[doc = "Field `DCCD1` reader - Debug Communication Channel 1 Dirty"]
10pub type Dccd1R = crate::BitReader;
11#[doc = "Field `HPE` reader - Hot-Plugging Enable"]
12pub type HpeR = crate::BitReader;
13impl R {
14    #[doc = "Bit 0 - Protected"]
15    #[inline(always)]
16    pub fn prot(&self) -> ProtR {
17        ProtR::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - Debugger Present"]
20    #[inline(always)]
21    pub fn dbgpres(&self) -> DbgpresR {
22        DbgpresR::new(((self.bits >> 1) & 1) != 0)
23    }
24    #[doc = "Bit 2 - Debug Communication Channel 0 Dirty"]
25    #[inline(always)]
26    pub fn dccd0(&self) -> Dccd0R {
27        Dccd0R::new(((self.bits >> 2) & 1) != 0)
28    }
29    #[doc = "Bit 3 - Debug Communication Channel 1 Dirty"]
30    #[inline(always)]
31    pub fn dccd1(&self) -> Dccd1R {
32        Dccd1R::new(((self.bits >> 3) & 1) != 0)
33    }
34    #[doc = "Bit 4 - Hot-Plugging Enable"]
35    #[inline(always)]
36    pub fn hpe(&self) -> HpeR {
37        HpeR::new(((self.bits >> 4) & 1) != 0)
38    }
39}
40#[doc = "Status B\n\nYou can [`read`](crate::Reg::read) this register and get [`statusb::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct StatusbSpec;
42impl crate::RegisterSpec for StatusbSpec {
43    type Ux = u8;
44}
45#[doc = "`read()` method returns [`statusb::R`](R) reader structure"]
46impl crate::Readable for StatusbSpec {}
47#[doc = "`reset()` method sets STATUSB to value 0"]
48impl crate::Resettable for StatusbSpec {
49    const RESET_VALUE: u8 = 0;
50}