openthread_sys

Function otPlatRadioAddCalibratedPower

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

Add a calibrated power of the specified channel to the power calibration table.

@note This API is an optional radio platform API. It’s up to the platform layer to implement it.

The @p aActualPower is the actual measured output power when the parameters of the radio hardware modules are set to the @p aRawPowerSetting.

The raw power setting is an opaque byte array. OpenThread doesn’t define the format of the raw power setting. Its format is radio hardware related and it should be defined by the developers in the platform radio driver. For example, if the radio hardware contains both the radio chip and the FEM chip, the raw power setting can be a combination of the radio power register and the FEM gain value.

@param[in] aInstance The OpenThread instance structure. @param[in] aChannel The radio channel. @param[in] aActualPower The actual power in 0.01dBm. @param[in] aRawPowerSetting A pointer to the raw power setting byte array. @param[in] aRawPowerSettingLength The length of the @p aRawPowerSetting.

@retval OT_ERROR_NONE Successfully added the calibrated power to the power calibration table. @retval OT_ERROR_NO_BUFS No available entry in the power calibration table. @retval OT_ERROR_INVALID_ARGS The @p aChannel, @p aActualPower or @p aRawPowerSetting is invalid or the @p aActualPower already exists in the power calibration table. @retval OT_ERROR_NOT_IMPLEMENTED This feature is not implemented.