Added ble_radio_notification files to my project in SDK11, but they wont compile.
Added ble_radio_notification files to my project in SDK11, but they wont compile.
Most of the bugs are fixed in SDK12, but you still need to include nrf_nvic.h:
#include "nrf_nvic.h"
This is a bug in the ble_radio_notification files. Sd_nvic_ functions have been moved to nrf_nvic.h, so include this in ble_radio_notification.h.
nrf_radio_notification_distance_t is no longer defined. Change to uint8_t instead (used by sd_radio_notification_cfg_set).
Here are the fixed files:
ble_radio_notification.c
ble_radio_notification.h
sd_radio_notification_cfg_set()
uses uint8_t, but the values have to be the ones defined in the anonymous enums NRF_RADIO_NOTIFICATION_DISTANCES
and NRF_RADIO_NOTIFICATION_TYPES
. These enums are the same as a defines in practice. The reason sd_radio_notification_cfg_set()
does not take enums as argumenst is that enums can have different sizes depending on compiler options, which may cause issues regarding alignment and backwards compatibility. The application may also be compiled by a different compiler than the SoftDevice which can make it use different sizes for the enums.
sd_radio_notification_cfg_set()
uses uint8_t, but the values have to be the ones defined in the anonymous enums NRF_RADIO_NOTIFICATION_DISTANCES
and NRF_RADIO_NOTIFICATION_TYPES
. These enums are the same as a defines in practice. The reason sd_radio_notification_cfg_set()
does not take enums as argumenst is that enums can have different sizes depending on compiler options, which may cause issues regarding alignment and backwards compatibility. The application may also be compiled by a different compiler than the SoftDevice which can make it use different sizes for the enums.