1#
2# Copyright (c) 2020 Siddharth Chandrasekaran <siddharth@embedjournal.com>
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7# OSDP_NUM_CONNECTED_PD is used in CP mode. It is a constant set to 1 when
8# operating as a PD.
9config OSDP_NUM_CONNECTED_PD
10	int
11	default 1
12	help
13	  In PD mode, number of connected PDs is always 1 and cannot
14	  be configured.
15
16config OSDP_PD_COMMAND_QUEUE_SIZE
17	int "OSDP Peripheral Device command queue size"
18	default 16
19	help
20	  The number of commands that can be queued to a given PD. In CP mode,
21	  the queue size is multiplied by number of connected PD so this can grow
22	  very quickly.
23
24config OSDP_PD_ADDRESS
25	int "Peripheral Device Address"
26	default 1
27	range 1 126
28	help
29	  The 7 least significant bits represent the address of the PD to which
30	  the message is directed, or the address of the PD sending the reply.
31	  Address 0x7F is reserved as a broadcast address to which all PDs would
32	  respond.
33
34if OSDP_SC_ENABLED
35
36config OSDP_PD_SCBK
37	string "Secure Channel Base Key (SCBK)"
38	default "NONE"
39	help
40	  Hexadecimal string representation of the 16 byte OSDP PD Secure
41	  Channel Base Key. When this field is sent to "NONE", the PD is set to
42	  "Install Mode". In this mode, the PD would allow a CP to setup a secure
43	  channel with default SCBK. Once as secure channel is active with the
44	  default key, the CP can send a KEYSET command to set new keys to the PD.
45	  It is up to the user to make sure that the PD enters the "Install Mode"
46	  only during provisioning time (controlled environment).
47
48endif # OSDP_SC_ENABLED
49
50menu "Peripheral Device ID Information"
51
52config OSDP_PD_ID_VENDOR_CODE
53	hex "PD Vendor Code"
54	default 0x001A2B3C
55	range 0 0x00FFFFFF
56	help
57	  IEEE assigned OUI. Least 24 bits are valid.
58
59config OSDP_PD_ID_MODEL
60	int "PD Product Model Number"
61	default 1
62	range 0 $(UINT8_MAX)
63	help
64	  Manufacturer's model number. Least 8 bits are valid.
65
66config OSDP_PD_ID_VERSION
67	int "PD Product Version"
68	default 1
69	range 0 $(UINT8_MAX)
70	help
71	  Manufacturer's version of this product. Least 8 bits are valid.
72
73config OSDP_PD_ID_SERIAL_NUMBER
74	hex "PD Serial Number"
75	default 0xCAFEBABE
76	range 0 0xFFFFFFFF
77	help
78	  A 4-byte serial number for the PD.
79
80config OSDP_PD_ID_FIRMWARE_VERSION
81	hex "PD Firmware Version"
82	default 0x00010100
83	range 0 0x00FFFFFF
84	help
85	  Firmware revision code.
86	    - Bit 0-7  : build version number;
87	    - Bit 8-15 : minor version number;
88	    - Bit 16-23: major version number;
89
90endmenu # "PD ID Information"
91
92menu "OSDP PD Capabilities"
93
94menu "Contact Status Monitoring"
95
96config OSDP_PD_CAP_CONTACT_STATUS_MONITORING_COMP_LEVEL
97	int "Compliance Level"
98	default 0
99	range 0 4
100	help
101	  Possible values:
102	  - 01: PD monitors and reports the state of the circuit without any
103	  supervision. The PD encodes the circuit status per its default
104	  interpretation of contact state to active/inactive status.
105	  - 02: Like 01, plus: The PD accepts configuration of the encoding of the
106	  open/closed circuit status to the reported active/inactive status. (User
107	  may configure each circuit as "normally closed" or "normally open".)
108	  - 03: Like 02, plus: PD supports supervised monitoring. The operating mode
109	  for each circuit is determined by configuration settings.
110	  - 04: Like 03, plus: the PD supports custom End-Of-Line settings within
111	  the Manufacturer's guidelines.
112
113config OSDP_PD_CAP_CONTACT_STATUS_MONITORING_NUM_ITEMS
114	int "Number of items"
115	default 0
116	help
117	  The number of Inputs
118
119endmenu # "Contact Status Monitoring"
120
121menu "Output Control"
122
123config OSDP_PD_CAP_OUTPUT_CONTROL_COMP_LEVEL
124	int "Compliance Level"
125	default 0
126	range 0 4
127	help
128	  Possible values:
129	  - 01: The PD is able to activate and deactivate the Output per direct
130	  command from the CP.
131	  - 02: Like 01, plus: The PD is able to accept configuration of the Output
132	  driver to set the inactive state of the Output. The typical state of an
133	  inactive Output is the state of the Output when no power is applied to the
134	  PD and the output device (relay) is not energized. The inverted drive
135	  setting causes the PD to energize the Output during the inactive state and
136	  de-energize the Output during the active state. This feature allows the
137	  support of "fail-safe/fail-secure" operating modes.
138	  - 03: Like 01, plus: The PD is able to accept timed commands to the
139	  Output. A timed command specifies the state of the Output for the
140	  specified duration.
141	  - 04: Like 02 and 03 - normal/inverted drive and timed operation.
142
143config OSDP_PD_CAP_OUTPUT_CONTROL_NUM_ITEMS
144	int "Number of items"
145	default 0
146	help
147	  The number of Outputs.
148
149endmenu # "Output Control"
150
151menu "LED Control"
152
153config OSDP_PD_CAP_READER_LED_CONTROL_COMP_LEVEL
154	int "Compliance Level"
155	default 0
156	range 0 4
157	help
158	  Possible values:
159	  - 01: the PD support on/off control only
160	  - 02: the PD supports timed commands
161	  - 03: like 02, plus bi-color LEDs
162	  - 04: like 02, plus tri-color LEDs
163
164config OSDP_PD_CAP_READER_LED_CONTROL_NUM_ITEMS
165	int "Number of items"
166	default 0
167	help
168	  The number of LEDs per reader.
169
170endmenu # "LED Control"
171
172menu "Audible Output"
173
174config OSDP_PD_CAP_READER_AUDIBLE_OUTPUT_COMP_LEVEL
175	int "Compliance Level"
176	default 0
177	range 0 2
178	help
179	  Possible values:
180	  - 01: the PD support on/off control only
181	  - 02: the PD supports timed commands
182
183config OSDP_PD_CAP_READER_AUDIBLE_OUTPUT_NUM_ITEMS
184	int "Number of items"
185	default 0
186	help
187	  The number of audible annunciators per reader
188
189endmenu # "Audible Output"
190
191menu "Text Output"
192
193config OSDP_PD_CAP_READER_TEXT_OUTPUT_COMP_LEVEL
194	int "Compliance Level"
195	default 0
196	range 0 4
197	help
198	  Possible values:
199	  - 00: The PD has no text display support
200	  - 01: The PD supports 1 row of 16 characters
201	  - 02: the PD supports 2 rows of 16 characters
202	  - 03: the PD supports 4 rows of 16 characters
203	  - 04: TBD.
204
205config OSDP_PD_CAP_READER_TEXT_OUTPUT_NUM_ITEMS
206	int "Number of items"
207	default 0
208	help
209	  Number of textual displays per reader
210
211endmenu # "Text Output"
212
213menu "Card Data Format"
214
215config OSDP_PD_CAP_CARD_DATA_FORMAT_COMP_LEVEL
216	int "Compliance Level"
217	default 0
218	range 0 3
219	help
220	  Possible values:
221	  - 01: the PD sends card data to the CP as array of bits, not exceeding
222	  1024 bits.
223	  - 02: the PD sends card data to the CP as array of BCD characters, not
224	  exceeding 256 characters.
225	  - 03: the PD can send card data to the CP as array of bits, or as an
226	  array of BCD characters.
227
228endmenu # "Card Data Format"
229
230menu "Time Keeping"
231
232config OSDP_PD_CAP_TIME_KEEPING_COMP_LEVEL
233	int "Compliance Level"
234	default 0
235	range 0 2
236	help
237	  Possible values:
238	  - 00: The PD does not support time/date functionality
239	  - 01: The PD understands time/date settings per Command osdp_TDSET
240	  - 02: The PD is able to locally update the time and date
241
242endmenu # "Time Keeping"
243
244endmenu # "OSDP PD Capabilities"
245