atsamd51j20a/rtc/mode0/
comp.rs1#[doc = "Reader of register COMP[%s]"]
2pub type R = crate::R<u32, super::COMP>;
3#[doc = "Writer for register COMP[%s]"]
4pub type W = crate::W<u32, super::COMP>;
5#[doc = "Register COMP[%s]
6`reset()`'s with value 0"]
7impl crate::ResetValue for super::COMP {
8 type Type = u32;
9 #[inline(always)]
10 fn reset_value() -> Self::Type {
11 0
12 }
13}
14#[doc = "Reader of field `COMP`"]
15pub type COMP_R = crate::R<u32, u32>;
16#[doc = "Write proxy for field `COMP`"]
17pub struct COMP_W<'a> {
18 w: &'a mut W,
19}
20impl<'a> COMP_W<'a> {
21 #[doc = r"Writes raw bits to the field"]
22 #[inline(always)]
23 pub unsafe fn bits(self, value: u32) -> &'a mut W {
24 self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
25 self.w
26 }
27}
28impl R {
29 #[doc = "Bits 0:31 - Compare Value"]
30 #[inline(always)]
31 pub fn comp(&self) -> COMP_R {
32 COMP_R::new((self.bits & 0xffff_ffff) as u32)
33 }
34}
35impl W {
36 #[doc = "Bits 0:31 - Compare Value"]
37 #[inline(always)]
38 pub fn comp(&mut self) -> COMP_W {
39 COMP_W { w: self }
40 }
41}