nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_dm_proc_execute()

nrf_dm_status_t nrf_dm_proc_execute ( uint32_t  timeout_us)

#include <nrf_dm/include/nrf_dm.h>

Start the distance measurement.

Note
Reflector will wait for sync, while initiator will start immediately. After completion it's possible to request distance with nrf_dm_calc.
Parameters
[in]timeout_usIf the distance measurement is not complete within this time the measurment will be aborted. For the measurement to complete the timeout must be at least the duration given by nrf_dm_get_duration_us for the used configuration nrf_dm_config_t plus the overhead given by the constant NRF_DM_PROC_EXECUTE_DURATION_OVERHEAD_US. A reflector should typically use a larger timeout because it needs to wait for the initial sync packet sent by the initiator.
Returns
A status code, NRF_DM_STATUS_SUCCESS if the measurement is successful, otherwise an appropriate failure status.