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
#[doc = "Reader of register READY"] pub type R = crate::R<u32, super::READY>; #[doc = "NVMC is ready or busy\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum READY_A { #[doc = "0: NVMC is busy (ongoing write or erase operation)"] BUSY, #[doc = "1: NVMC is ready"] READY, } impl From<READY_A> for bool { #[inline(always)] fn from(variant: READY_A) -> Self { match variant { READY_A::BUSY => false, READY_A::READY => true, } } } #[doc = "Reader of field `READY`"] pub type READY_R = crate::R<bool, READY_A>; impl READY_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> READY_A { match self.bits { false => READY_A::BUSY, true => READY_A::READY, } } #[doc = "Checks if the value of the field is `BUSY`"] #[inline(always)] pub fn is_busy(&self) -> bool { *self == READY_A::BUSY } #[doc = "Checks if the value of the field is `READY`"] #[inline(always)] pub fn is_ready(&self) -> bool { *self == READY_A::READY } } impl R { #[doc = "Bit 0 - NVMC is ready or busy"] #[inline(always)] pub fn ready(&self) -> READY_R { READY_R::new((self.bits & 0x01) != 0) } }