openthread_sys

Function otLinkRawEnergyScan

Source
pub unsafe extern "C" fn otLinkRawEnergyScan(
    aInstance: *mut otInstance,
    aScanChannel: u8,
    aScanDuration: u16,
    aCallback: otLinkRawEnergyScanDone,
) -> otError
Expand description

Begins the energy scan sequence on the radio.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aScanChannel The channel to perform the energy scan on. @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @param[in] aCallback A pointer to a function called on completion of a scanned channel.

@retval OT_ERROR_NONE Successfully started scanning the channel. @retval OT_ERROR_BUSY The radio is performing energy scanning. @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn’t support energy scanning. @retval OT_ERROR_INVALID_STATE If the raw link-layer isn’t enabled.