Skip to main content

mcxa_pac/sgi0/
sgi_int_status_clr.rs

1#[doc = "Register `sgi_int_status_clr` reader"]
2pub type R = crate::R<SgiIntStatusClrSpec>;
3#[doc = "Register `sgi_int_status_clr` writer"]
4pub type W = crate::W<SgiIntStatusClrSpec>;
5#[doc = "Field `int_clr` reader - Write to clear interrupt status flag (SGI_INT_STATUS.INT_PDONE=0)."]
6pub type IntClrR = crate::BitReader;
7#[doc = "Field `int_clr` writer - Write to clear interrupt status flag (SGI_INT_STATUS.INT_PDONE=0)."]
8pub type IntClrW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `int_stsc_rsvd` reader - reserved"]
10pub type IntStscRsvdR = crate::FieldReader<u32>;
11impl R {
12    #[doc = "Bit 0 - Write to clear interrupt status flag (SGI_INT_STATUS.INT_PDONE=0)."]
13    #[inline(always)]
14    pub fn int_clr(&self) -> IntClrR {
15        IntClrR::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bits 1:31 - reserved"]
18    #[inline(always)]
19    pub fn int_stsc_rsvd(&self) -> IntStscRsvdR {
20        IntStscRsvdR::new((self.bits >> 1) & 0x7fff_ffff)
21    }
22}
23#[cfg(feature = "debug")]
24impl core::fmt::Debug for R {
25    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26        f.debug_struct("sgi_int_status_clr")
27            .field("int_clr", &self.int_clr())
28            .field("int_stsc_rsvd", &self.int_stsc_rsvd())
29            .finish()
30    }
31}
32impl W {
33    #[doc = "Bit 0 - Write to clear interrupt status flag (SGI_INT_STATUS.INT_PDONE=0)."]
34    #[inline(always)]
35    pub fn int_clr(&mut self) -> IntClrW<'_, SgiIntStatusClrSpec> {
36        IntClrW::new(self, 0)
37    }
38}
39#[doc = "Interrupt status clear\n\nYou can [`read`](crate::Reg::read) this register and get [`sgi_int_status_clr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sgi_int_status_clr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct SgiIntStatusClrSpec;
41impl crate::RegisterSpec for SgiIntStatusClrSpec {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [`sgi_int_status_clr::R`](R) reader structure"]
45impl crate::Readable for SgiIntStatusClrSpec {}
46#[doc = "`write(|w| ..)` method takes [`sgi_int_status_clr::W`](W) writer structure"]
47impl crate::Writable for SgiIntStatusClrSpec {
48    type Safety = crate::Unsafe;
49}
50#[doc = "`reset()` method sets sgi_int_status_clr to value 0"]
51impl crate::Resettable for SgiIntStatusClrSpec {}