|
| 1 | +.. _lib_ble_radio_notification: |
| 2 | + |
| 3 | +Bluetooth: Radio Notification |
| 4 | +############################# |
| 5 | + |
| 6 | +.. contents:: |
| 7 | + :local: |
| 8 | + :depth: 2 |
| 9 | + |
| 10 | +The Bluetooth Low Energy® Radio Notification library provides an interface for subscribing to the Radio Notification signal, allowing the application to receive notifications before and after radio events occur. |
| 11 | + |
| 12 | +Overview |
| 13 | +******** |
| 14 | + |
| 15 | +This library enables applications to register a handler for receiving radio notifications. |
| 16 | +You can also use it to configure the interval in microseconds between the active Radio Notification signal and the radio event. |
| 17 | + |
| 18 | +Configuration |
| 19 | +************* |
| 20 | + |
| 21 | +The library is enabled and configured using the Kconfig system. |
| 22 | +Set the :kconfig:option:`CONFIG_BLE_RADIO_NOTIFICATION` Kconfig option to enable the library. |
| 23 | + |
| 24 | +The library uses the ``SWI02`` IRQ. |
| 25 | +Use the :kconfig:option:`CONFIG_BLE_RADIO_NOTIFICATION_IRQ_PRIO` Kconfig option to set the IRQ priority. |
| 26 | + |
| 27 | +The library can be configured to receive notifications before the radio is active, after the radio is active, or both before and after. |
| 28 | +You can select this using the :kconfig:option:`CONFIG_BLE_RADIO_NOTIFICATION_ON_ACTIVE`, the :kconfig:option:`CONFIG_BLE_RADIO_NOTIFICATION_ON_INACTIVE`, or the :kconfig:option:`CONFIG_BLE_RADIO_NOTIFICATION_ON_BOTH` Kconfig options, respectively. |
| 29 | + |
| 30 | +Initialization |
| 31 | +============== |
| 32 | + |
| 33 | +Initialize the library by calling the :c:func:`ble_radio_notification_init` function. |
| 34 | + |
| 35 | +Usage |
| 36 | +***** |
| 37 | + |
| 38 | +When initializing the library with the :c:func:`ble_radio_notification_init` function, make sure to specify the event handler to receive the Radio Notification signal. |
| 39 | +You can specify the interval in microseconds between the Radio Notification signal and the start of the radio event. |
| 40 | +The signal raised at the start of the radio event has ``active_state`` set to ``true``. |
| 41 | +A new Radio Notification signal will be raised when the radio event completes with ``active_state`` set to ``false``. |
| 42 | + |
| 43 | +Sample |
| 44 | +****** |
| 45 | + |
| 46 | +The usage of this library is demonstrated in the :ref:`ble_radio_ntf_sample` sample. |
| 47 | + |
| 48 | +Dependencies |
| 49 | +************ |
| 50 | + |
| 51 | +This library uses the following |BMshort| libraries: |
| 52 | + |
| 53 | +* SoftDevice - :kconfig:option:`CONFIG_SOFTDEVICE` |
| 54 | +* SoftDevice handler - :kconfig:option:`CONFIG_NRF_SDH` |
| 55 | + |
| 56 | +API documentation |
| 57 | +***************** |
| 58 | + |
| 59 | +| Header file: :file:`include/bm/bluetooth/ble_radio_notification.h` |
| 60 | +| Source files: :file:`lib/bluetooth/ble_radio_notification/` |
| 61 | +
|
| 62 | +:ref:`Bluetooth LE Radio Notification library API reference <api_ble_radio_notif>` |
0 commit comments