|
| 1 | +# |
| 2 | +# Copyright (c) 2025 Nordic Semiconductor ASA |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause |
| 5 | +# |
| 6 | + |
| 7 | +config DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL |
| 8 | + bool |
| 9 | + default y if !DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL_ALT |
| 10 | + depends on DESKTOP_HID_REPORT_SYSTEM_CTRL_SUPPORT |
| 11 | + select DESKTOP_HID_KEYMAP |
| 12 | + select DESKTOP_HID_EVENTQ |
| 13 | + select DESKTOP_KEYS_STATE |
| 14 | + help |
| 15 | + This option automatically enables the default HID system control |
| 16 | + report provider for HID peripheral that supports HID system control |
| 17 | + report. |
| 18 | + |
| 19 | +config DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL_ALT |
| 20 | + bool "Use custom HID system control report provider" |
| 21 | + depends on DESKTOP_HID_REPORT_SYSTEM_CTRL_SUPPORT |
| 22 | + help |
| 23 | + Enable this option if you want to support HID system control report |
| 24 | + and use a custom HID system control report provider. Make sure to |
| 25 | + introduce the custom HID system control report provider if you |
| 26 | + enable this option. |
| 27 | + |
| 28 | +if DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL |
| 29 | + |
| 30 | +config DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL_KEYPRESS_EXPIRATION |
| 31 | + int "HID keypress expiration [ms]" |
| 32 | + default DESKTOP_HID_REPORT_EXPIRATION |
| 33 | + default 500 |
| 34 | + help |
| 35 | + If a keypress is recorded before HID subscriber connects, it is stored |
| 36 | + in HID event queue and processed after the subscriber connects. This |
| 37 | + Kconfig option specifies time after which a queued keypress will be |
| 38 | + considered expired. The higher the value, the longer the period from |
| 39 | + which the module will recall pressed keys when the connection with HID |
| 40 | + host is established. |
| 41 | + |
| 42 | + The first default is deprecated and used for backwards compatibility. |
| 43 | + |
| 44 | +config DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL_EVENT_QUEUE_SIZE |
| 45 | + int "HID keypress queue size" |
| 46 | + default DESKTOP_HID_EVENT_QUEUE_SIZE |
| 47 | + default 12 |
| 48 | + range 2 255 |
| 49 | + help |
| 50 | + The option limits the number of keypresses (button press or release) |
| 51 | + on the HID event queue where the keypresses are stored before the |
| 52 | + connection with HID host is established. If there is no space in the |
| 53 | + queue to enqueue a new key state change, the oldest element is |
| 54 | + released. |
| 55 | + |
| 56 | + The first default is deprecated and used for backwards compatibility. |
| 57 | + |
| 58 | +module = DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL |
| 59 | +module-str = HID provider system control |
| 60 | +source "subsys/logging/Kconfig.template.log_config" |
| 61 | + |
| 62 | +endif # DESKTOP_HID_REPORT_PROVIDER_SYSTEM_CTRL |
0 commit comments