Skip to content

Commit 34e116e

Browse files
divipillaijfischer-no
authored andcommitted
doc: nRF desktop - Split docs into subpages
The documents were updated to match the application template and split the documents into subpages to follow the conatiner content strategy. Signed-off-by: divya pillai <divya.pillai@nordicsemi.no>
1 parent dfdf1c8 commit 34e116e

15 files changed

+2500
-2386
lines changed

applications/nrf_desktop/README.rst

+17-2,374
Large diffs are not rendered by default.

applications/nrf_desktop/api.rst

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _nrf_desktop_api:
2+
3+
nRF Desktop: API documentation
4+
##############################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
Following are the API elements used by the application.
11+
12+
HID reports
13+
***********
14+
15+
| Header file: :file:`applications/nrf_desktop/configuration/common/hid_report_desc.h`
16+
| Source file: :file:`applications/nrf_desktop/configuration/common/hid_report_desc.c`
17+
18+
.. doxygengroup:: nrf_desktop_hid_reports
19+
:project: nrf
20+
:members:
21+
22+
LED states
23+
**********
24+
25+
| Header file: :file:`applications/nrf_desktop/configuration/common/led_state.h`
26+
| Source file: :file:`applications/nrf_desktop/src/modules/led_state.c`
27+
28+
.. doxygengroup:: nrf_desktop_led_state
29+
:project: nrf
30+
:members:
31+
32+
USB events
33+
**********
34+
35+
| Header file: :file:`applications/nrf_desktop/src/events/usb_event.h`
36+
| Source file: :file:`applications/nrf_desktop/src/modules/usb_state.c`
37+
38+
.. doxygengroup:: nrf_desktop_usb_event
39+
:project: nrf
40+
:members:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
.. _nrf_desktop_application_Kconfig:
2+
3+
nRF Desktop application-specific Kconfig options
4+
################################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
The nRF Desktop introduces Kconfig options that you can use to simplify an application configuration.
11+
You can use these options to select a device role and to automatically apply a default configuration suitable for the selected role.
12+
13+
.. note::
14+
Part of the default configuration is applied by modifying the default values of Kconfig options.
15+
Changing configuration in menuconfig does not automatically adjust user-configurable values to the new defaults.
16+
So, you must update those values manually.
17+
For more information, see the Stuck symbols in menuconfig and guiconfig section on the :ref:`kconfig_tips_and_tricks` in the Zephyr documentation.
18+
19+
The default Kconfig option values are automatically updated if configuration changes are applied directly in the configuration files.
20+
21+
.. _nrf_desktop_hid_configuration:
22+
23+
HID configuration
24+
*****************
25+
26+
The nRF Desktop application introduces application-specific configuration options related to HID device configuration.
27+
These options are defined in :file:`Kconfig.hid`.
28+
29+
The options define the nRF Desktop device role.
30+
The device role can be either a HID dongle (:ref:`CONFIG_DESKTOP_ROLE_HID_DONGLE <config_desktop_app_options>`) or a HID peripheral (:ref:`CONFIG_DESKTOP_ROLE_HID_PERIPHERAL <config_desktop_app_options>`).
31+
The HID peripheral role can also specify a peripheral type:
32+
33+
* HID mouse (:ref:`CONFIG_DESKTOP_PERIPHERAL_TYPE_MOUSE <config_desktop_app_options>`)
34+
* HID keyboard (:ref:`CONFIG_DESKTOP_PERIPHERAL_TYPE_KEYBOARD <config_desktop_app_options>`)
35+
* other HID device (:ref:`CONFIG_DESKTOP_PERIPHERAL_TYPE_OTHER <config_desktop_app_options>`)
36+
37+
Each role automatically implies the nRF Desktop modules needed for the role.
38+
For example, :ref:`nrf_desktop_hid_state` is automatically enabled for the HID peripheral role.
39+
40+
By default, the nRF Desktop devices use a predefined format of HID reports.
41+
The common HID report map is defined in the :file:`configuration/common/hid_report_desc.c` file.
42+
The selected role implies a set of related HID reports.
43+
For example, HID mouse automatically enables support for HID mouse report.
44+
If you select ``other HID device`` peripheral type, you need to explicitly define the set of HID reports in the configuration.
45+
46+
Apart from this, you can specify the supported HID boot protocol interface as one of the following:
47+
48+
* mouse (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE <config_desktop_app_options>`)
49+
* keyboard (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD <config_desktop_app_options>`)
50+
* none (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_DISABLED <config_desktop_app_options>`)
51+
52+
.. _nrf_desktop_hid_device_identifiers:
53+
54+
HID device identifiers
55+
======================
56+
57+
The nRF Desktop application defines the following common device identifiers:
58+
59+
* Manufacturer (:ref:`CONFIG_DESKTOP_DEVICE_MANUFACTURER <config_desktop_app_options>`)
60+
* Vendor ID (:ref:`CONFIG_DESKTOP_DEVICE_VID <config_desktop_app_options>`)
61+
* Product name (:ref:`CONFIG_DESKTOP_DEVICE_PRODUCT <config_desktop_app_options>`)
62+
* Product ID (:ref:`CONFIG_DESKTOP_DEVICE_PID <config_desktop_app_options>`)
63+
64+
These Kconfig options determine the default values of device identifiers used for:
65+
66+
* :ref:`nrf_desktop_usb_state_identifiers`
67+
* BLE GATT Device Information Service (:kconfig:option:`CONFIG_BT_DIS`) that is required for :ref:`nrf_desktop_bluetooth_guide_peripheral`
68+
69+
.. note::
70+
Apart from the mentioned common device identifiers, the nRF Desktop application defines an application-specific string representing device generation (:ref:`CONFIG_DESKTOP_DEVICE_GENERATION <config_desktop_app_options>`).
71+
The generation allows to distinguish configurations that use the same board and bootloader, but are not interoperable.
72+
The value can be read through the :ref:`nrf_desktop_config_channel`.
73+
74+
Debug configuration
75+
*******************
76+
77+
The nRF Desktop application introduces application-specific configuration options related to the ``debug`` configuration.
78+
These options are defined in the :file:`Kconfig.debug` file.
79+
80+
The :ref:`CONFIG_DESKTOP_LOG <config_desktop_app_options>` Kconfig option enables support for logging in the nRF Desktop application.
81+
This option overlays Kconfig option defaults from the Logging subsystem to align them with the nRF Desktop requirements.
82+
The nRF Desktop configuration uses SEGGER J-Link RTT as the Logging subsystem backend.
83+
84+
The :ref:`CONFIG_DESKTOP_SHELL <config_desktop_app_options>` Kconfig option enables support for CLI in the nRF Desktop application.
85+
This option overlays Kconfig option defaults from the Shell subsystem to align them with the nRF Desktop requirements.
86+
The nRF Desktop configuration uses SEGGER J-Link RTT as the Shell subsystem backend.
87+
If both shell and logging are enabled, logger uses shell as the logging backend.
88+
89+
See the :file:`Kconfig.debug` file content for details.
90+
91+
Default common configuration
92+
****************************
93+
94+
The nRF Desktop application aligns the configuration with the nRF Desktop use case by overlaying Kconfig defaults and selecting or implying the required Kconfig options.
95+
Among others, the Kconfig :ref:`app_event_manager` and :ref:`lib_caf` options are selected to ensure that they are enabled.
96+
The :ref:`CONFIG_DESKTOP_SETTINGS_LOADER <config_desktop_app_options>` and :ref:`CONFIG_DESKTOP_POWER_MANAGER <config_desktop_app_options>` are implied to enable the :ref:`nrf_desktop_settings_loader` and :ref:`nrf_desktop_power_manager` modules, respectively.
97+
See the :file:`Kconfig.defaults` file for details related to the default common configuration.
98+
99+
.. _nrf_desktop_bluetooth_configuration:
100+
101+
Bluetooth configuration
102+
***********************
103+
104+
The nRF Desktop application introduces application-specific configuration options related to Bluetooth connectivity configuration.
105+
These options are defined in :file:`Kconfig.ble` file.
106+
107+
The :ref:`CONFIG_DESKTOP_BT <config_desktop_app_options>` Kconfig option enables support for Bluetooth connectivity in the nRF Desktop application.
108+
The option is enabled by default.
109+
110+
The nRF Desktop Bluetooth peripheral configuration (:ref:`CONFIG_DESKTOP_BT_PERIPHERAL <config_desktop_app_options>`) is automatically enabled for the nRF Desktop HID peripheral role (:ref:`CONFIG_DESKTOP_ROLE_HID_PERIPHERAL <config_desktop_app_options>`).
111+
The nRF Desktop Bluetooth central configuration (:ref:`CONFIG_DESKTOP_BT_CENTRAL <config_desktop_app_options>`) is automatically enabled for the nRF Desktop HID dongle role (:ref:`CONFIG_DESKTOP_ROLE_HID_DONGLE <config_desktop_app_options>`)
112+
113+
The nRF Desktop Bluetooth configuration options perform the following:
114+
115+
* Imply Bluetooth-related application modules that are required for the selected device role.
116+
* Select required functionalities in Zephyr's Bluetooth stack.
117+
* Overlay Bluetooth Kconfig option defaults to align them with the nRF Desktop use case.
118+
119+
See :file:`Kconfig.ble` file content for details.
120+
See the :ref:`nrf_desktop_bluetooth_guide` for more information about Bluetooth support in nRF Desktop application.
121+
122+
CAF configuration
123+
******************
124+
125+
The nRF Desktop application overlays the defaults of the :ref:`lib_caf` related Kconfig options to align them with the nRF Desktop use case.
126+
The files that apply the overlays are located in the :file:`src/modules` directory and are named :file:`Kconfig.caf_module_name.default`.
127+
For example, the Kconfig defaults of :ref:`caf_settings_loader` are overlayed in the :file:`src/modules/Kconfig.caf_settings_loader.default`.

0 commit comments

Comments
 (0)