1#[doc = "Register `PRUN` reader"]
2pub type R = crate::R<PRUN_SPEC>;
3#[doc = "Run Bit\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum RB_A {
6 #[doc = "0: IDLE"]
7 VALUE1 = 0,
8 #[doc = "1: Running"]
9 VALUE2 = 1,
10}
11impl From<RB_A> for bool {
12 #[inline(always)]
13 fn from(variant: RB_A) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `RB` reader - Run Bit"]
18pub type RB_R = crate::BitReader<RB_A>;
19impl RB_R {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> RB_A {
23 match self.bits {
24 false => RB_A::VALUE1,
25 true => RB_A::VALUE2,
26 }
27 }
28 #[doc = "IDLE"]
29 #[inline(always)]
30 pub fn is_value1(&self) -> bool {
31 *self == RB_A::VALUE1
32 }
33 #[doc = "Running"]
34 #[inline(always)]
35 pub fn is_value2(&self) -> bool {
36 *self == RB_A::VALUE2
37 }
38}
39impl R {
40 #[doc = "Bit 0 - Run Bit"]
41 #[inline(always)]
42 pub fn rb(&self) -> RB_R {
43 RB_R::new((self.bits & 1) != 0)
44 }
45}
46#[doc = "POSIF Run Bit Status\n\nYou can [`read`](crate::Reg::read) this register and get [`prun::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct PRUN_SPEC;
48impl crate::RegisterSpec for PRUN_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`prun::R`](R) reader structure"]
52impl crate::Readable for PRUN_SPEC {}
53#[doc = "`reset()` method sets PRUN to value 0"]
54impl crate::Resettable for PRUN_SPEC {
55 const RESET_VALUE: u32 = 0;
56}