@@ -161,18 +161,23 @@ enum NRF_POWER_THRESHOLDS
161
161
NRF_POWER_THRESHOLD_V28 /**< 2.8 Volts power failure threshold. */
162
162
};
163
163
164
- /**@brief Radio notification distances. */
164
+
165
+ /**@brief Radio notification distances.
166
+ *
167
+ * @note SoftDevice support is not limited to the distances enumerated here.
168
+ * This enumeration is kept only for backwards compatibility with applications developed for previous versions of SoftDevice.
169
+ */
165
170
enum NRF_RADIO_NOTIFICATION_DISTANCES
166
171
{
167
- NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0 , /**< The event does not have a notification. */
168
- NRF_RADIO_NOTIFICATION_DISTANCE_200US , /**< The distance from the active notification to start of radio activity . */
169
- NRF_RADIO_NOTIFICATION_DISTANCE_420US , /**< The distance from the active notification to start of radio activity . */
170
- NRF_RADIO_NOTIFICATION_DISTANCE_800US , /**< The distance from the active notification to start of radio activity . */
171
- NRF_RADIO_NOTIFICATION_DISTANCE_1740US , /**< The distance from the active notification to start of radio activity . */
172
- NRF_RADIO_NOTIFICATION_DISTANCE_2680US , /**< The distance from the active notification to start of radio activity . */
173
- NRF_RADIO_NOTIFICATION_DISTANCE_3620US , /**< The distance from the active notification to start of radio activity . */
174
- NRF_RADIO_NOTIFICATION_DISTANCE_4560US , /**< The distance from the active notification to start of radio activity . */
175
- NRF_RADIO_NOTIFICATION_DISTANCE_5500US /**< The distance from the active notification to start of radio activity . */
172
+ NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0 , /**< The event does not have a notification. */
173
+ NRF_RADIO_NOTIFICATION_DISTANCE_200US = 200 , /**< The distance from the active notification to start of radio event preparation . */
174
+ NRF_RADIO_NOTIFICATION_DISTANCE_420US = 420 , /**< The distance from the active notification to start of radio event preparation . */
175
+ NRF_RADIO_NOTIFICATION_DISTANCE_800US = 800 , /**< The distance from the active notification to start of radio event preparation . */
176
+ NRF_RADIO_NOTIFICATION_DISTANCE_1740US = 1740 , /**< The distance from the active notification to start of radio event preparation . */
177
+ NRF_RADIO_NOTIFICATION_DISTANCE_2680US = 2680 , /**< The distance from the active notification to start of radio event preparation . */
178
+ NRF_RADIO_NOTIFICATION_DISTANCE_3620US = 3620 , /**< The distance from the active notification to start of radio event preparation . */
179
+ NRF_RADIO_NOTIFICATION_DISTANCE_4560US = 4560 , /**< The distance from the active notification to start of radio event preparation . */
180
+ NRF_RADIO_NOTIFICATION_DISTANCE_5500US = 5500 /**< The distance from the active notification to start of radio event preparation . */
176
181
};
177
182
178
183
/**@brief Radio notification types. */
@@ -589,27 +594,28 @@ __STATIC_INLINE uint32_t sd_app_evt_wait(void)
589
594
* notifications must be configured when there is no protocol stack or other SoftDevice
590
595
* activity in progress. It is recommended that the radio notification signal is
591
596
* configured directly after the SoftDevice has been enabled.
592
- * - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice
593
- * will interrupt the application to do Radio Event preparation.
597
+ * - The ACTIVE signal comes the configured distance before the SoftDevice does the
598
+ * Radio Event preparation.
594
599
* - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have
595
600
* to shorten the connection events to have time for the Radio Notification signals.
596
601
*
597
- * @param[in] type Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES.
598
- * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio
599
- * notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is
600
- * recommended (but not required) to be used with
601
- * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE.
602
+ * @param[in] type Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES.
603
+ * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio
604
+ * notification. Using distance 0 is recommended (but not required) to be used with
605
+ * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE.
602
606
*
603
- * @param[in] distance Distance between the notification signal and start of radio activity, see @ref NRF_RADIO_NOTIFICATION_DISTANCES.
604
- * This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or
605
- * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used.
607
+ * @param[in] distance_us Distance between the ACTIVE notification signal and start of radio event
608
+ * preparation by SoftDevice in microseconds.
609
+ * Valid range range is [50 to 5500] microseconds.
610
+ * This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or
611
+ * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used.
606
612
*
607
- * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid.
613
+ * @retval ::NRF_ERROR_INVALID_PARAM The configuration is invalid.
608
614
* @retval ::NRF_ERROR_INVALID_STATE A protocol stack or other SoftDevice is running. Stop all
609
615
* running activities and retry.
610
616
* @retval ::NRF_SUCCESS
611
617
*/
612
- SVCALL (SD_RADIO_NOTIFICATION_CFG_SET , uint32_t , sd_radio_notification_cfg_set (uint8_t type , uint8_t distance ));
618
+ SVCALL (SD_RADIO_NOTIFICATION_CFG_SET , uint32_t , sd_radio_notification_cfg_set (uint8_t type , uint16_t distance_us ));
613
619
614
620
/**@brief Encrypts a block according to the specified parameters.
615
621
*
0 commit comments