This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 14 migration guide bug

I am porting my code from SDK 13 to SDK 14.2 (nRF5_SDK_14.2.0_17b948a) and following the migration guide. In the SoftDevice handler section I think the following section is wrong, as it does not use the pointer to the m_hrs type:

/* The BLE_HRS_DEF macro above is equivalent to the following pattern: */
ble_hrs_t m_hrs; /* HRS instance. */
NRF_SDH_BLE_OBSERVER(
m_hrs_ble_observer,
BLE_HRS_BLE_OBSERVER_PRIO,
ble_hrs_on_ble_evt,
m_hrs
);

It should probably be changed to something like this:

/* The BLE_HRS_DEF macro above is equivalent to the following pattern: */
ble_hrs_t m_hrs; /* HRS instance. */
NRF_SDH_BLE_OBSERVER(
m_hrs_ble_observer,
BLE_HRS_BLE_OBSERVER_PRIO,
ble_hrs_on_ble_evt,
(void *)&m_hrs
);
Related