efm32pg22_pac/efm32pg22c200/cryptoacc_s/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `FETCHERBSY` reader - Fetcher busy"]
17pub type FETCHERBSY_R = crate::BitReader<bool>;
18#[doc = "Field `PUSHERBSY` reader - Pusher busy"]
19pub type PUSHERBSY_R = crate::BitReader<bool>;
20#[doc = "Field `NOTEMPTY` reader - Not empty flag from input FIFO (fetcher)"]
21pub type NOTEMPTY_R = crate::BitReader<bool>;
22#[doc = "Field `WAITING` reader - Pusher waiting for FIFO"]
23pub type WAITING_R = crate::BitReader<bool>;
24#[doc = "Field `SOFTRSTBSY` reader - Software reset busy"]
25pub type SOFTRSTBSY_R = crate::BitReader<bool>;
26#[doc = "Field `FIFODATANUM` reader - Number of data in output FIFO"]
27pub type FIFODATANUM_R = crate::FieldReader<u16, u16>;
28impl R {
29    #[doc = "Bit 0 - Fetcher busy"]
30    #[inline(always)]
31    pub fn fetcherbsy(&self) -> FETCHERBSY_R {
32        FETCHERBSY_R::new((self.bits & 1) != 0)
33    }
34    #[doc = "Bit 1 - Pusher busy"]
35    #[inline(always)]
36    pub fn pusherbsy(&self) -> PUSHERBSY_R {
37        PUSHERBSY_R::new(((self.bits >> 1) & 1) != 0)
38    }
39    #[doc = "Bit 4 - Not empty flag from input FIFO (fetcher)"]
40    #[inline(always)]
41    pub fn notempty(&self) -> NOTEMPTY_R {
42        NOTEMPTY_R::new(((self.bits >> 4) & 1) != 0)
43    }
44    #[doc = "Bit 5 - Pusher waiting for FIFO"]
45    #[inline(always)]
46    pub fn waiting(&self) -> WAITING_R {
47        WAITING_R::new(((self.bits >> 5) & 1) != 0)
48    }
49    #[doc = "Bit 6 - Software reset busy"]
50    #[inline(always)]
51    pub fn softrstbsy(&self) -> SOFTRSTBSY_R {
52        SOFTRSTBSY_R::new(((self.bits >> 6) & 1) != 0)
53    }
54    #[doc = "Bits 16:31 - Number of data in output FIFO"]
55    #[inline(always)]
56    pub fn fifodatanum(&self) -> FIFODATANUM_R {
57        FIFODATANUM_R::new(((self.bits >> 16) & 0xffff) as u16)
58    }
59}
60#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
61pub struct STATUS_SPEC;
62impl crate::RegisterSpec for STATUS_SPEC {
63    type Ux = u32;
64}
65#[doc = "`read()` method returns [status::R](R) reader structure"]
66impl crate::Readable for STATUS_SPEC {
67    type Reader = R;
68}
69#[doc = "`reset()` method sets STATUS to value 0"]
70impl crate::Resettable for STATUS_SPEC {
71    const RESET_VALUE: Self::Ux = 0;
72}