1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
#[doc = "Reader of register SR"] pub type R = crate::R<u32, super::SR>; #[doc = "Write error flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum WRERR_A { #[doc = "0: Write error not detected"] NOERROR, #[doc = "1: Write error detected"] ERROR, } impl From<WRERR_A> for bool { #[inline(always)] fn from(variant: WRERR_A) -> Self { match variant { WRERR_A::NOERROR => false, WRERR_A::ERROR => true, } } } #[doc = "Reader of field `WRERR`"] pub type WRERR_R = crate::R<bool, WRERR_A>; impl WRERR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> WRERR_A { match self.bits { false => WRERR_A::NOERROR, true => WRERR_A::ERROR, } } #[doc = "Checks if the value of the field is `NOERROR`"] #[inline(always)] pub fn is_no_error(&self) -> bool { *self == WRERR_A::NOERROR } #[doc = "Checks if the value of the field is `ERROR`"] #[inline(always)] pub fn is_error(&self) -> bool { *self == WRERR_A::ERROR } } #[doc = "Read error flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum RDERR_A { #[doc = "0: Read error not detected"] NOERROR, #[doc = "1: Read error detected"] ERROR, } impl From<RDERR_A> for bool { #[inline(always)] fn from(variant: RDERR_A) -> Self { match variant { RDERR_A::NOERROR => false, RDERR_A::ERROR => true, } } } #[doc = "Reader of field `RDERR`"] pub type RDERR_R = crate::R<bool, RDERR_A>; impl RDERR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> RDERR_A { match self.bits { false => RDERR_A::NOERROR, true => RDERR_A::ERROR, } } #[doc = "Checks if the value of the field is `NOERROR`"] #[inline(always)] pub fn is_no_error(&self) -> bool { *self == RDERR_A::NOERROR } #[doc = "Checks if the value of the field is `ERROR`"] #[inline(always)] pub fn is_error(&self) -> bool { *self == RDERR_A::ERROR } } #[doc = "Computation complete flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CCF_A { #[doc = "0: Computation complete"] COMPLETE, #[doc = "1: Computation not complete"] NOTCOMPLETE, } impl From<CCF_A> for bool { #[inline(always)] fn from(variant: CCF_A) -> Self { match variant { CCF_A::COMPLETE => false, CCF_A::NOTCOMPLETE => true, } } } #[doc = "Reader of field `CCF`"] pub type CCF_R = crate::R<bool, CCF_A>; impl CCF_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> CCF_A { match self.bits { false => CCF_A::COMPLETE, true => CCF_A::NOTCOMPLETE, } } #[doc = "Checks if the value of the field is `COMPLETE`"] #[inline(always)] pub fn is_complete(&self) -> bool { *self == CCF_A::COMPLETE } #[doc = "Checks if the value of the field is `NOTCOMPLETE`"] #[inline(always)] pub fn is_not_complete(&self) -> bool { *self == CCF_A::NOTCOMPLETE } } impl R { #[doc = "Bit 2 - Write error flag"] #[inline(always)] pub fn wrerr(&self) -> WRERR_R { WRERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Read error flag"] #[inline(always)] pub fn rderr(&self) -> RDERR_R { RDERR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Computation complete flag"] #[inline(always)] pub fn ccf(&self) -> CCF_R { CCF_R::new((self.bits & 0x01) != 0) } }