imxrt_ral/blocks/imxrt1011/
kpp.rs

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