atsam4lc2b_pac/tc0/
features.rs

1#[doc = "Register `FEATURES` reader"]
2pub struct R(crate::R<FEATURES_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<FEATURES_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<FEATURES_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<FEATURES_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CTRSIZE` reader - Counter Size"]
17pub type CTRSIZE_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `UPDNIMPL` reader - Up Down is Implemented"]
19pub type UPDNIMPL_R = crate::BitReader<bool>;
20#[doc = "Field `BRPBHSB` reader - Bridge Type is PB to HSB"]
21pub type BRPBHSB_R = crate::BitReader<bool>;
22impl R {
23    #[doc = "Bits 0:7 - Counter Size"]
24    #[inline(always)]
25    pub fn ctrsize(&self) -> CTRSIZE_R {
26        CTRSIZE_R::new((self.bits & 0xff) as u8)
27    }
28    #[doc = "Bit 8 - Up Down is Implemented"]
29    #[inline(always)]
30    pub fn updnimpl(&self) -> UPDNIMPL_R {
31        UPDNIMPL_R::new(((self.bits >> 8) & 1) != 0)
32    }
33    #[doc = "Bit 9 - Bridge Type is PB to HSB"]
34    #[inline(always)]
35    pub fn brpbhsb(&self) -> BRPBHSB_R {
36        BRPBHSB_R::new(((self.bits >> 9) & 1) != 0)
37    }
38}
39#[doc = "Features 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 [features](index.html) module"]
40pub struct FEATURES_SPEC;
41impl crate::RegisterSpec for FEATURES_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [features::R](R) reader structure"]
45impl crate::Readable for FEATURES_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets FEATURES to value 0"]
49impl crate::Resettable for FEATURES_SPEC {
50    const RESET_VALUE: Self::Ux = 0;
51}