1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#[doc = "KPP Registers"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "Keypad Control Register"]
    pub KPCR: crate::RWRegister<u16>,
    #[doc = "Keypad Status Register"]
    pub KPSR: crate::RWRegister<u16>,
    #[doc = "Keypad Data Direction Register"]
    pub KDDR: crate::RWRegister<u16>,
    #[doc = "Keypad Data Register"]
    pub KPDR: crate::RWRegister<u16>,
}
#[doc = "Keypad Control Register"]
pub mod KPCR {
    #[doc = "Keypad Row Enable"]
    pub mod KRE {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Row is not included in the keypad key press detect."]
            pub const KRE_0: u16 = 0;
            #[doc = "Row is included in the keypad key press detect."]
            pub const KRE_1: u16 = 0x01;
        }
    }
    #[doc = "Keypad Column Strobe Open-Drain Enable"]
    pub mod KCO {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Column strobe output is totem pole drive."]
            pub const TOTEM_POLE: u16 = 0;
            #[doc = "Column strobe output is open drain."]
            pub const OPEN_DRAIN: u16 = 0x01;
        }
    }
}
#[doc = "Keypad Status Register"]
pub mod KPSR {
    #[doc = "Keypad Key Depress"]
    pub mod KPKD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No key presses detected"]
            pub const KPKD_0: u16 = 0;
            #[doc = "A key has been depressed"]
            pub const KPKD_1: u16 = 0x01;
        }
    }
    #[doc = "Keypad Key Release"]
    pub mod KPKR {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No key release detected"]
            pub const KPKR_0: u16 = 0;
            #[doc = "All keys have been released"]
            pub const KPKR_1: u16 = 0x01;
        }
    }
    #[doc = "Key Depress Synchronizer Clear"]
    pub mod KDSC {
        pub const offset: u16 = 2;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const KDSC_0: u16 = 0;
            #[doc = "Set bits that clear the keypad depress synchronizer chain"]
            pub const KDSC_1: u16 = 0x01;
        }
    }
    #[doc = "Key Release Synchronizer Set"]
    pub mod KRSS {
        pub const offset: u16 = 3;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const KRSS_0: u16 = 0;
            #[doc = "Set bits which sets keypad release synchronizer chain"]
            pub const KRSS_1: u16 = 0x01;
        }
    }
    #[doc = "Keypad Key Depress Interrupt Enable"]
    pub mod KDIE {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt request is generated when KPKD is set."]
            pub const KDIE_0: u16 = 0;
            #[doc = "An interrupt request is generated when KPKD is set."]
            pub const KDIE_1: u16 = 0x01;
        }
    }
    #[doc = "Keypad Release Interrupt Enable"]
    pub mod KRIE {
        pub const offset: u16 = 9;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt request is generated when KPKR is set."]
            pub const KRIE_0: u16 = 0;
            #[doc = "An interrupt request is generated when KPKR is set."]
            pub const KRIE_1: u16 = 0x01;
        }
    }
}
#[doc = "Keypad Data Direction Register"]
pub mod KDDR {
    #[doc = "Keypad Row Data Direction"]
    pub mod KRDD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "ROWn pin configured as an input."]
            pub const INPUT: u16 = 0;
            #[doc = "ROWn pin configured as an output."]
            pub const OUTPUT: u16 = 0x01;
        }
    }
    #[doc = "Keypad Column Data Direction Register"]
    pub mod KCDD {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "COLn pin is configured as an input."]
            pub const INPUT: u16 = 0;
            #[doc = "COLn pin is configured as an output."]
            pub const OUTPUT: u16 = 0x01;
        }
    }
}
#[doc = "Keypad Data Register"]
pub mod KPDR {
    #[doc = "Keypad Row Data"]
    pub mod KRD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Keypad Column Data"]
    pub mod KCD {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}