efm32pg12_pac/msc/
aapunlockcmd.rs1#[doc = "Writer for register AAPUNLOCKCMD"]
2pub type W = crate::W<u32, super::AAPUNLOCKCMD>;
3#[doc = "Register AAPUNLOCKCMD `reset()`'s with value 0"]
4impl crate::ResetValue for super::AAPUNLOCKCMD {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Write proxy for field `UNLOCKAAP`"]
12pub struct UNLOCKAAP_W<'a> {
13 w: &'a mut W,
14}
15impl<'a> UNLOCKAAP_W<'a> {
16 #[doc = r"Sets the field bit"]
17 #[inline(always)]
18 pub fn set_bit(self) -> &'a mut W {
19 self.bit(true)
20 }
21 #[doc = r"Clears the field bit"]
22 #[inline(always)]
23 pub fn clear_bit(self) -> &'a mut W {
24 self.bit(false)
25 }
26 #[doc = r"Writes raw bits to the field"]
27 #[inline(always)]
28 pub fn bit(self, value: bool) -> &'a mut W {
29 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
30 self.w
31 }
32}
33impl W {
34 #[doc = "Bit 0 - Software Unlock AAP Command"]
35 #[inline(always)]
36 pub fn unlockaap(&mut self) -> UNLOCKAAP_W {
37 UNLOCKAAP_W { w: self }
38 }
39}