atsaml21e18b/tc0/count8/
status.rs1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `STATUS` writer"]
17pub struct W(crate::W<STATUS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<STATUS_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<STATUS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<STATUS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `STOP` reader - Stop Status Flag"]
38pub type STOP_R = crate::BitReader<bool>;
39#[doc = "Field `SLAVE` reader - Slave Status Flag"]
40pub type SLAVE_R = crate::BitReader<bool>;
41#[doc = "Field `PERBUFV` reader - Synchronization Busy Status"]
42pub type PERBUFV_R = crate::BitReader<bool>;
43#[doc = "Field `PERBUFV` writer - Synchronization Busy Status"]
44pub type PERBUFV_W<'a, const O: u8> = crate::BitWriter<'a, u8, STATUS_SPEC, bool, O>;
45#[doc = "Field `CCBUFV0` reader - Compare channel buffer 0 valid"]
46pub type CCBUFV0_R = crate::BitReader<bool>;
47#[doc = "Field `CCBUFV0` writer - Compare channel buffer 0 valid"]
48pub type CCBUFV0_W<'a, const O: u8> = crate::BitWriter<'a, u8, STATUS_SPEC, bool, O>;
49#[doc = "Field `CCBUFV1` reader - Compare channel buffer 1 valid"]
50pub type CCBUFV1_R = crate::BitReader<bool>;
51#[doc = "Field `CCBUFV1` writer - Compare channel buffer 1 valid"]
52pub type CCBUFV1_W<'a, const O: u8> = crate::BitWriter<'a, u8, STATUS_SPEC, bool, O>;
53impl R {
54 #[doc = "Bit 0 - Stop Status Flag"]
55 #[inline(always)]
56 pub fn stop(&self) -> STOP_R {
57 STOP_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - Slave Status Flag"]
60 #[inline(always)]
61 pub fn slave(&self) -> SLAVE_R {
62 SLAVE_R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 3 - Synchronization Busy Status"]
65 #[inline(always)]
66 pub fn perbufv(&self) -> PERBUFV_R {
67 PERBUFV_R::new(((self.bits >> 3) & 1) != 0)
68 }
69 #[doc = "Bit 4 - Compare channel buffer 0 valid"]
70 #[inline(always)]
71 pub fn ccbufv0(&self) -> CCBUFV0_R {
72 CCBUFV0_R::new(((self.bits >> 4) & 1) != 0)
73 }
74 #[doc = "Bit 5 - Compare channel buffer 1 valid"]
75 #[inline(always)]
76 pub fn ccbufv1(&self) -> CCBUFV1_R {
77 CCBUFV1_R::new(((self.bits >> 5) & 1) != 0)
78 }
79}
80impl W {
81 #[doc = "Bit 3 - Synchronization Busy Status"]
82 #[inline(always)]
83 #[must_use]
84 pub fn perbufv(&mut self) -> PERBUFV_W<3> {
85 PERBUFV_W::new(self)
86 }
87 #[doc = "Bit 4 - Compare channel buffer 0 valid"]
88 #[inline(always)]
89 #[must_use]
90 pub fn ccbufv0(&mut self) -> CCBUFV0_W<4> {
91 CCBUFV0_W::new(self)
92 }
93 #[doc = "Bit 5 - Compare channel buffer 1 valid"]
94 #[inline(always)]
95 #[must_use]
96 pub fn ccbufv1(&mut self) -> CCBUFV1_W<5> {
97 CCBUFV1_W::new(self)
98 }
99 #[doc = "Writes raw bits to the register."]
100 #[inline(always)]
101 pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
102 self.0.bits(bits);
103 self
104 }
105}
106#[doc = "Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
107pub struct STATUS_SPEC;
108impl crate::RegisterSpec for STATUS_SPEC {
109 type Ux = u8;
110}
111#[doc = "`read()` method returns [status::R](R) reader structure"]
112impl crate::Readable for STATUS_SPEC {
113 type Reader = R;
114}
115#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"]
116impl crate::Writable for STATUS_SPEC {
117 type Writer = W;
118 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
119 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
120}
121#[doc = "`reset()` method sets STATUS to value 0x01"]
122impl crate::Resettable for STATUS_SPEC {
123 const RESET_VALUE: Self::Ux = 0x01;
124}