1#[doc = "Reader of register FCR"]
2pub type R = crate::R<u32, super::FCR>;
3#[doc = "Writer for register FCR"]
4pub type W = crate::W<u32, super::FCR>;
5#[doc = "Register FCR `reset()`'s with value 0x0700"]
6impl crate::ResetValue for super::FCR {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x0700
11 }
12}
13#[doc = "Reader of field `FRACTION`"]
14pub type FRACTION_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `FRACTION`"]
16pub struct FRACTION_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> FRACTION_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0x3f) | ((value as u32) & 0x3f);
24 self.w
25 }
26}
27#[doc = "Reader of field `INTEGER`"]
28pub type INTEGER_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `INTEGER`"]
30pub struct INTEGER_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> INTEGER_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8);
38 self.w
39 }
40}
41impl R {
42 #[doc = "Bits 0:5 - Fraction Part Formula = (fraction part of detected value) x 60 Note: Digit in FCR must be expressed as hexadecimal number. Refer to 5.8.4.4 for the examples."]
43 #[inline(always)]
44 pub fn fraction(&self) -> FRACTION_R {
45 FRACTION_R::new((self.bits & 0x3f) as u8)
46 }
47 #[doc = "Bits 8:11 - Integer Part Integer part of detected value FCR\\[11:8\\]
48Integer part of detected value FCR\\[11:8\\]
4932776 1111 32768 0111 32775 1110 32767 0110 32774 1101 32766 0101 32773 1100 32765 0100 32772 1011 32764 0011 32771 1010 32763 0010 32770 1001 32762 0001 32769 1000 32761 0000"]
50 #[inline(always)]
51 pub fn integer(&self) -> INTEGER_R {
52 INTEGER_R::new(((self.bits >> 8) & 0x0f) as u8)
53 }
54}
55impl W {
56 #[doc = "Bits 0:5 - Fraction Part Formula = (fraction part of detected value) x 60 Note: Digit in FCR must be expressed as hexadecimal number. Refer to 5.8.4.4 for the examples."]
57 #[inline(always)]
58 pub fn fraction(&mut self) -> FRACTION_W {
59 FRACTION_W { w: self }
60 }
61 #[doc = "Bits 8:11 - Integer Part Integer part of detected value FCR\\[11:8\\]
62Integer part of detected value FCR\\[11:8\\]
6332776 1111 32768 0111 32775 1110 32767 0110 32774 1101 32766 0101 32773 1100 32765 0100 32772 1011 32764 0011 32771 1010 32763 0010 32770 1001 32762 0001 32769 1000 32761 0000"]
64 #[inline(always)]
65 pub fn integer(&mut self) -> INTEGER_W {
66 INTEGER_W { w: self }
67 }
68}