mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 12:47:47 +00:00
[link] move otLinkSetShortAddress() decl to link_raw.h (#3348)
This commit is contained in:
@@ -441,18 +441,6 @@ OTAPI void OTCALL otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPerio
|
||||
*/
|
||||
OTAPI otShortAddress OTCALL otLinkGetShortAddress(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Set the Short Address for address filtering.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aShortAddress The IEEE 802.15.4 Short Address.
|
||||
*
|
||||
* @retval OT_ERROR_NONE If successful.
|
||||
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
||||
*
|
||||
*/
|
||||
OTAPI otError OTCALL otLinkSetShortAddress(otInstance *aInstance, uint16_t aShortAddress);
|
||||
|
||||
/**
|
||||
* This function gets the address mode of MAC filter.
|
||||
*
|
||||
|
||||
@@ -97,6 +97,18 @@ bool otLinkRawGetPromiscuous(otInstance *aInstance);
|
||||
*/
|
||||
otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable);
|
||||
|
||||
/**
|
||||
* Set the Short Address for address filtering.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aShortAddress The IEEE 802.15.4 Short Address.
|
||||
*
|
||||
* @retval OT_ERROR_NONE If successful.
|
||||
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
||||
*
|
||||
*/
|
||||
otError OTCALL otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress);
|
||||
|
||||
/**
|
||||
* Transition the radio from Receive to Sleep.
|
||||
* Turn off the radio.
|
||||
|
||||
@@ -59,7 +59,7 @@ bool otLinkRawIsEnabled(otInstance *aInstance)
|
||||
return static_cast<Instance *>(aInstance)->GetLinkRaw().IsEnabled();
|
||||
}
|
||||
|
||||
otError otLinkSetShortAddress(otInstance *aInstance, uint16_t aShortAddress)
|
||||
otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress)
|
||||
{
|
||||
return static_cast<Instance *>(aInstance)->GetLinkRaw().SetShortAddress(aShortAddress);
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ template <> otError NcpBase::HandlePropertySet<SPINEL_PROP_MAC_15_4_SADDR>(void)
|
||||
|
||||
SuccessOrExit(error = mDecoder.ReadUint16(shortAddress));
|
||||
|
||||
error = otLinkSetShortAddress(mInstance, shortAddress);
|
||||
error = otLinkRawSetShortAddress(mInstance, shortAddress);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user