1#[doc = "Register `IMR` reader"]
2pub type R = crate::R<ImrSpec>;
3#[doc = "Register `IMR` writer"]
4pub type W = crate::W<ImrSpec>;
5#[doc = "Field `IM` reader - Interrupt mask 1: The master interrupt is sent to the interrupt controller when the RIS bit in the I2CMRIS register is set. 0: The RIS interrupt is suppressed and not sent to the interrupt controller."]
6pub type ImR = crate::BitReader;
7#[doc = "Field `IM` writer - Interrupt mask 1: The master interrupt is sent to the interrupt controller when the RIS bit in the I2CMRIS register is set. 0: The RIS interrupt is suppressed and not sent to the interrupt controller."]
8pub type ImW<'a, REG> = crate::BitWriter<'a, REG>;
9impl R {
10 #[doc = "Bit 0 - Interrupt mask 1: The master interrupt is sent to the interrupt controller when the RIS bit in the I2CMRIS register is set. 0: The RIS interrupt is suppressed and not sent to the interrupt controller."]
11 #[inline(always)]
12 pub fn im(&self) -> ImR {
13 ImR::new((self.bits & 1) != 0)
14 }
15}
16impl W {
17 #[doc = "Bit 0 - Interrupt mask 1: The master interrupt is sent to the interrupt controller when the RIS bit in the I2CMRIS register is set. 0: The RIS interrupt is suppressed and not sent to the interrupt controller."]
18 #[inline(always)]
19 pub fn im(&mut self) -> ImW<ImrSpec> {
20 ImW::new(self, 0)
21 }
22}
23#[doc = "I2C master interrupt mask This register controls whether a raw interrupt is promoted to a controller interrupt.\n\nYou can [`read`](crate::Reg::read) this register and get [`imr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`imr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct ImrSpec;
25impl crate::RegisterSpec for ImrSpec {
26 type Ux = u32;
27}
28#[doc = "`read()` method returns [`imr::R`](R) reader structure"]
29impl crate::Readable for ImrSpec {}
30#[doc = "`write(|w| ..)` method takes [`imr::W`](W) writer structure"]
31impl crate::Writable for ImrSpec {
32 type Safety = crate::Unsafe;
33 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets IMR to value 0"]
37impl crate::Resettable for ImrSpec {
38 const RESET_VALUE: u32 = 0;
39}