Skip to content

Commit 2755125

Browse files
MarekPietakapi-no
authored andcommitted
applications: nrf_desktop: Document introducing custom HID providers
The documentation simplifies using custom HID providers. Change also adds a link to the newly introduced section from the HID configuration documentation. Jira: NCSDK-35005 Signed-off-by: Marek Pieta <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]>
1 parent 0227cc1 commit 2755125

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

applications/nrf_desktop/application_kconfig.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ You can enable the following HID reports:
5252
* HID system control report (:ref:`CONFIG_DESKTOP_HID_REPORT_SYSTEM_CTRL_SUPPORT <config_desktop_app_options>`)
5353
* HID consumer control report (:ref:`CONFIG_DESKTOP_HID_REPORT_CONSUMER_CTRL_SUPPORT <config_desktop_app_options>`)
5454

55+
.. note::
56+
nRF Desktop application allows you to modify the used HID input reports or introduce support for a new HID input report.
57+
This can be achieved by implementing a custom HID report provider that can be used together with the :ref:`nrf_desktop_hid_state`.
58+
For details, see the :ref:`nrf_desktop_hid_state_providing_hid_input_reports` documentation section.
59+
5560
Apart from this, you can specify the supported HID boot protocol interface as one of the following:
5661

5762
* mouse (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE <config_desktop_app_options>`)

applications/nrf_desktop/doc/hid_state.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,38 @@ The following application modules are used as default implementations of HID rep
175175
The respective HID report provider is automatically enabled if support for a given HID input report is enabled in the :ref:`nrf_desktop_hid_configuration`.
176176
See the documentation page of a HID report provider for detailed information about the provider.
177177

178+
Custom HID providers
179+
--------------------
180+
181+
You can implement your own HID report provider as part of the application.
182+
The HID report provider can perform one of the following two actions:
183+
184+
* Handle a HID input report that is already supported by the application instead of a default HID report provider (substitute the default HID report provider).
185+
Make sure to disable the default HID report provider while implementing the custom provider.
186+
* Support a new HID input report.
187+
188+
HID report map update
189+
~~~~~~~~~~~~~~~~~~~~~
190+
191+
If your HID report provider implementation uses a different HID input report format or you add a new HID input report, you need to align the HID report configuration (including the HID report map).
192+
If the default HID report descriptor is used (:ref:`CONFIG_DESKTOP_USE_DEFAULT_REPORT_DESCR <config_desktop_app_options>`), the configuration is defined by the following files:
193+
194+
* :file:`configuration/common/hid_report_desc.h`
195+
* :file:`configuration/common/hid_report_desc.c`
196+
197+
.. note::
198+
nRF Desktop dongles share a common HID report format with the nRF Desktop peripherals.
199+
The aligned HID report configuration is required for the dongle to forward HID input reports from the peripherals.
200+
201+
HID transport update
202+
~~~~~~~~~~~~~~~~~~~~
203+
204+
If you add a new HID input report, you might also need to update the modules that act as HID transports (for example :ref:`nrf_desktop_hids` or :ref:`nrf_desktop_usb_state`).
205+
This is needed to fulfill the following requirements:
206+
207+
* Proper configuration of the module and libraries used by the module.
208+
* Support for the newly added HID input report.
209+
178210
HID output reports
179211
==================
180212

0 commit comments

Comments
 (0)