openthread_sys

Function otPlatRadioGetRawPowerSetting

Source
pub unsafe extern "C" fn otPlatRadioGetRawPowerSetting(
    aInstance: *mut otInstance,
    aChannel: u8,
    aRawPowerSetting: *mut u8,
    aRawPowerSettingLength: *mut u16,
) -> otError
Expand description

Get the raw power setting for the given channel.

@note OpenThread src/core/utils implements a default implementation of the API otPlatRadioAddCalibratedPower(), otPlatRadioClearCalibratedPowers() and otPlatRadioSetChannelTargetPower(). This API is provided by the default implementation to get the raw power setting for the given channel. If the platform doesn’t use the default implementation, it can ignore this API.

Platform radio layer should parse the raw power setting based on the radio layer defined format and set the parameters of each radio hardware module.

@param[in] aInstance The OpenThread instance structure. @param[in] aChannel The radio channel. @param[out] aRawPowerSetting A pointer to the raw power setting byte array. @param[in,out] aRawPowerSettingLength On input, a pointer to the size of @p aRawPowerSetting. On output, a pointer to the length of the raw power setting data.

@retval OT_ERROR_NONE Successfully got the target power. @retval OT_ERROR_INVALID_ARGS The @p aChannel is invalid, @p aRawPowerSetting or @p aRawPowerSettingLength is NULL or @aRawPowerSettingLength is too short. @retval OT_ERROR_NOT_FOUND The raw power setting for the @p aChannel was not found.