atsam4ls8c_pac/catb/
parameter.rs1#[doc = "Register `PARAMETER` reader"]
2pub struct R(crate::R<PARAMETER_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PARAMETER_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PARAMETER_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PARAMETER_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `NPINS` reader - Number of Pins"]
17pub type NPINS_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `NSTATUS` reader - Number of Status bits"]
19pub type NSTATUS_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `FRACTIONAL` reader - Number of Fractional bits"]
21pub type FRACTIONAL_R = crate::FieldReader<u8, u8>;
22impl R {
23 #[doc = "Bits 0:7 - Number of Pins"]
24 #[inline(always)]
25 pub fn npins(&self) -> NPINS_R {
26 NPINS_R::new((self.bits & 0xff) as u8)
27 }
28 #[doc = "Bits 8:15 - Number of Status bits"]
29 #[inline(always)]
30 pub fn nstatus(&self) -> NSTATUS_R {
31 NSTATUS_R::new(((self.bits >> 8) & 0xff) as u8)
32 }
33 #[doc = "Bits 16:19 - Number of Fractional bits"]
34 #[inline(always)]
35 pub fn fractional(&self) -> FRACTIONAL_R {
36 FRACTIONAL_R::new(((self.bits >> 16) & 0x0f) as u8)
37 }
38}
39#[doc = "Parameter Register\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 [parameter](index.html) module"]
40pub struct PARAMETER_SPEC;
41impl crate::RegisterSpec for PARAMETER_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [parameter::R](R) reader structure"]
45impl crate::Readable for PARAMETER_SPEC {
46 type Reader = R;
47}
48#[doc = "`reset()` method sets PARAMETER to value 0"]
49impl crate::Resettable for PARAMETER_SPEC {
50 const RESET_VALUE: Self::Ux = 0;
51}