Commit 04d3dcb1 authored by Andrzej Kuroś's avatar Andrzej Kuroś Committed by Carles Cufi
Browse files

drivers: ieee802154_nrf5: energy_detected api change adjust



The prototype of `nrf_802154_energy_detected` callout has changed.
This commit adjusts to this change.

Signed-off-by: default avatarAndrzej Kuroś <andrzej.kuros@nordicsemi.no>
parent 69ae6cee
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1127,15 +1127,13 @@ void nrf_802154_cca_failed(nrf_802154_cca_error_t error)
	k_sem_give(&nrf5_data.cca_wait);
}

void nrf_802154_energy_detected(uint8_t result)
void nrf_802154_energy_detected(const nrf_802154_energy_detected_t *result)
{
	if (nrf5_data.energy_scan_done != NULL) {
		int16_t dbm;
		energy_scan_done_cb_t callback = nrf5_data.energy_scan_done;

		nrf5_data.energy_scan_done = NULL;
		dbm = nrf_802154_dbm_from_energy_level_calculate(result);
		callback(net_if_get_device(nrf5_data.iface), dbm);
		callback(net_if_get_device(nrf5_data.iface), result->ed_dbm);
	}
}

+4 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ else()
  target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_CARRIER_FUNCTIONS_ENABLED=0)
endif()

if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION)
  target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_ENERGY_DETECTED_VERSION=1)
endif()

set(NRF52_SERIES  ${CONFIG_SOC_SERIES_NRF52X})
set(NRF53_SERIES  ${CONFIG_SOC_SERIES_NRF53X})
set(SER_HOST      ${CONFIG_NRF_802154_SER_HOST})