mimxrt685s_pac/spi0/
fifointstat.rs1#[doc = "Register `FIFOINTSTAT` reader"]
2pub type R = crate::R<FifointstatSpec>;
3#[doc = "Field `TXERR` reader - TX FIFO error."]
4pub type TxerrR = crate::BitReader;
5#[doc = "Field `RXERR` reader - RX FIFO error."]
6pub type RxerrR = crate::BitReader;
7#[doc = "Field `TXLVL` reader - Transmit FIFO level interrupt."]
8pub type TxlvlR = crate::BitReader;
9#[doc = "Field `RXLVL` reader - Receive FIFO level interrupt."]
10pub type RxlvlR = crate::BitReader;
11#[doc = "Field `PERINT` reader - Peripheral interrupt."]
12pub type PerintR = crate::BitReader;
13impl R {
14 #[doc = "Bit 0 - TX FIFO error."]
15 #[inline(always)]
16 pub fn txerr(&self) -> TxerrR {
17 TxerrR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - RX FIFO error."]
20 #[inline(always)]
21 pub fn rxerr(&self) -> RxerrR {
22 RxerrR::new(((self.bits >> 1) & 1) != 0)
23 }
24 #[doc = "Bit 2 - Transmit FIFO level interrupt."]
25 #[inline(always)]
26 pub fn txlvl(&self) -> TxlvlR {
27 TxlvlR::new(((self.bits >> 2) & 1) != 0)
28 }
29 #[doc = "Bit 3 - Receive FIFO level interrupt."]
30 #[inline(always)]
31 pub fn rxlvl(&self) -> RxlvlR {
32 RxlvlR::new(((self.bits >> 3) & 1) != 0)
33 }
34 #[doc = "Bit 4 - Peripheral interrupt."]
35 #[inline(always)]
36 pub fn perint(&self) -> PerintR {
37 PerintR::new(((self.bits >> 4) & 1) != 0)
38 }
39}
40#[cfg(feature = "debug")]
41impl core::fmt::Debug for R {
42 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43 f.debug_struct("FIFOINTSTAT")
44 .field("txerr", &self.txerr())
45 .field("rxerr", &self.rxerr())
46 .field("txlvl", &self.txlvl())
47 .field("rxlvl", &self.rxlvl())
48 .field("perint", &self.perint())
49 .finish()
50 }
51}
52#[doc = "FIFO interrupt status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`fifointstat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
53pub struct FifointstatSpec;
54impl crate::RegisterSpec for FifointstatSpec {
55 type Ux = u32;
56}
57#[doc = "`read()` method returns [`fifointstat::R`](R) reader structure"]
58impl crate::Readable for FifointstatSpec {}
59#[doc = "`reset()` method sets FIFOINTSTAT to value 0"]
60impl crate::Resettable for FifointstatSpec {
61 const RESET_VALUE: u32 = 0;
62}