Bluetooth LE advertising control module
The Bluetooth LE advertising control module is responsible for controlling CAF: Bluetooth LE advertising module.
The module is used to suspend and resume the Bluetooth LE advertising module.
For now, the module can only react to the USB state changes.
It suspends the Bluetooth LE advertising module when the active USB device is connected (USB state is set to USB_STATE_ACTIVE).
It resumes the Bluetooth LE advertising module when the USB is disconnected (USB state is set to USB_STATE_DISCONNECTED) and the Bluetooth LE advertising module was earlier suspended.
This improves the USB High-Speed performance.
Module events
Source Module |
Input Event |
This Module |
Output Event |
Sink Module |
|---|---|---|---|---|
|
|
|||
|
||||
|
Note
See the Application overview for more information about the event-based communication in the nRF Desktop application and about how to read this table.
Configuration
This module is disabled by default.
To enable it, set the CONFIG_DESKTOP_BLE_ADV_CTRL_ENABLE Kconfig option to y.
To enable the module to suspend and resume the CAF: Bluetooth LE advertising module when USB state changes, set the CONFIG_DESKTOP_BLE_ADV_CTRL_SUSPEND_ON_USB Kconfig option to y.
It is recommended to enable this option if the device supports the USB High-Speed.
Implementation details
This module subscribes to usb_state_event events sent by the USB state module.
It reacts to these events by submitting module_suspend_req_event and module_resume_req_event events to the Bluetooth LE advertising module when it is required.