py32f0/py32f002a/iwdg/
kr.rs1pub struct W(crate::W<KR_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<KR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<KR_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<KR_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[derive(Clone, Copy, Debug, PartialEq, Eq)]
26#[repr(u16)]
27pub enum KEY_AW {
28    Enable = 21845,
30    Reset = 43690,
32    Start = 52428,
34}
35impl From<KEY_AW> for u16 {
36    #[inline(always)]
37    fn from(variant: KEY_AW) -> Self {
38        variant as _
39    }
40}
41pub type KEY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, KR_SPEC, u16, KEY_AW, 16, O>;
43impl<'a, const O: u8> KEY_W<'a, O> {
44    #[inline(always)]
46    pub fn enable(self) -> &'a mut W {
47        self.variant(KEY_AW::Enable)
48    }
49    #[inline(always)]
51    pub fn reset(self) -> &'a mut W {
52        self.variant(KEY_AW::Reset)
53    }
54    #[inline(always)]
56    pub fn start(self) -> &'a mut W {
57        self.variant(KEY_AW::Start)
58    }
59}
60impl W {
61    #[inline(always)]
63    #[must_use]
64    pub fn key(&mut self) -> KEY_W<0> {
65        KEY_W::new(self)
66    }
67    #[inline(always)]
69    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
70        self.0.bits(bits);
71        self
72    }
73}
74pub struct KR_SPEC;
80impl crate::RegisterSpec for KR_SPEC {
81    type Ux = u32;
82}
83impl crate::Writable for KR_SPEC {
85    type Writer = W;
86    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
87    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
88}
89impl crate::Resettable for KR_SPEC {
91    const RESET_VALUE: Self::Ux = 0;
92}