1# 2# Copyright (c) 2020 Siddharth Chandrasekaran <siddharth@embedjournal.com> 3# 4# SPDX-License-Identifier: Apache-2.0 5# 6 7menuconfig OSDP 8 bool "Open Supervised Device Protocol (OSDP) driver" 9 select RING_BUFFER 10 imply SERIAL_SUPPORT_INTERRUPT 11 imply UART_INTERRUPT_DRIVEN 12 help 13 Add support for Open Supervised Device Protocol (OSDP) 14 15if OSDP 16 17choice 18 prompt "OSDP Mode of Operation" 19 config OSDP_MODE_PD 20 bool "Configure OSDP in Peripheral Device mode" 21 help 22 Configure this device to operate as a PD (Peripheral Device) 23 config OSDP_MODE_CP 24 bool "Configure OSDP in Control Panel mode" 25 help 26 Configure this device to operate as a CP (Control Panel) 27endchoice 28 29# Workaround for not being able to have commas in macro arguments 30DT_CHOSEN_Z_OSDP_UART := zephyr,osdp-uart 31 32config OSDP_UART_DEV_NAME 33 string "Device name of UART device for OSDP" 34 default "$(dt_chosen_label,$(DT_CHOSEN_Z_OSDP_UART))" if HAS_DTS 35 default "UART_2" 36 help 37 This option specifies the name of UART device to be used for 38 OSDP 39 40config OSDP_UART_BAUD_RATE 41 int "OSDP UART baud rate" 42 default 115200 43 help 44 OSDP defines that baud rate can be either 9600 or 38400 or 45 115200. 46 47config OSDP_LOG_LEVEL 48 int "OSDP Logging Level" 49 default 1 50 help 51 Set the logging level for the OSDP driver 52 53config OSDP_UART_BUFFER_LENGTH 54 int "OSDP UART buffer length" 55 default 256 56 help 57 OSDP RX and TX buffer FIFO length. 58 59config OSDP_THREAD_STACK_SIZE 60 int "OSDP Thread stack size" 61 default 1024 62 help 63 Thread stack size for osdp refresh thread 64 65config OSDP_PACKET_TRACE 66 bool "Print bytes sent/received over OSDP to console" 67 help 68 Prints bytes sent/received over OSDP to console for debugging. 69 LOG_HEXDUMP_DBG() is used to achieve this and can be very verbose. 70 71config OSDP_SC_ENABLED 72 bool "Enable OSDP Secure Channel" 73 depends on CSPRING_ENABLED 74 default y 75 select CRYPTO 76 select CRYPTO_MBEDTLS_SHIM 77 select MBEDTLS 78 select MBEDTLS_CIPHER_CCM_ENABLED 79 help 80 Secure the OSDP communication channel with encryption and mutual 81 authentication. 82 83if OSDP_SC_ENABLED 84 85config OSDP_SC_RETRY_WAIT_SEC 86 int "Retry wait time in seconds after a Secure Channel error" 87 default 600 88 help 89 Time in seconds to wait after a secure channel failure, and before 90 retrying to establish it. 91 92config OSDP_CRYPTO_DRV_NAME 93 string "Crypto driver to use with OSDP" 94 default "CRYPTO_MTLS" 95 help 96 OSDP Secure Channel uses AES-128 to secure communication between 97 CP and PD. Provide an available crypto driver name here. 98 99endif # OSDP_SC_ENABLED 100 101if OSDP_MODE_PD 102source "subsys/mgmt/osdp/Kconfig.pd" 103endif 104 105if OSDP_MODE_CP 106source "subsys/mgmt/osdp/Kconfig.cp" 107endif 108 109endif # OSDP 110