mirror of
https://github.com/espressif/openthread.git
synced 2026-09-10 11:10:08 +00:00
[radio] unify around otExtAddress type (#2029)
This commit is contained in:
@@ -200,7 +200,7 @@ typedef enum _OTLWF_NOTIF_TYPE
|
||||
#define IOCTL_OTLWF_OT_EXTENDED_ADDRESS \
|
||||
OTLWF_CTL_CODE(107, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
|
||||
// GUID - InterfaceGuid
|
||||
// otExtAddress - aExtendedAddress
|
||||
// otExtAddress - aExtAddress
|
||||
|
||||
#define IOCTL_OTLWF_OT_EXTENDED_PANID \
|
||||
OTLWF_CTL_CODE(108, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
|
||||
|
||||
@@ -1476,7 +1476,7 @@ otThreadSetChildTimeout(
|
||||
|
||||
OTAPI
|
||||
const
|
||||
uint8_t *
|
||||
otExtAddress *
|
||||
OTCALL
|
||||
otLinkGetExtendedAddress(
|
||||
_In_ otInstance *aInstance
|
||||
@@ -1490,7 +1490,7 @@ otLinkGetExtendedAddress(
|
||||
free(Result);
|
||||
Result = nullptr;
|
||||
}
|
||||
return (uint8_t*)Result;
|
||||
return Result;
|
||||
}
|
||||
|
||||
OTAPI
|
||||
@@ -1498,11 +1498,11 @@ otError
|
||||
OTCALL
|
||||
otLinkSetExtendedAddress(
|
||||
_In_ otInstance *aInstance,
|
||||
const otExtAddress *aExtendedAddress
|
||||
const otExtAddress *aExtAddress
|
||||
)
|
||||
{
|
||||
if (aInstance == nullptr) return OT_ERROR_INVALID_ARGS;
|
||||
return DwordToThreadError(SetIOCTL(aInstance, IOCTL_OTLWF_OT_EXTENDED_ADDRESS, aExtendedAddress));
|
||||
return DwordToThreadError(SetIOCTL(aInstance, IOCTL_OTLWF_OT_EXTENDED_ADDRESS, aExtAddress));
|
||||
}
|
||||
|
||||
OTAPI
|
||||
|
||||
@@ -210,7 +210,7 @@ void otPlatRadioSetPanId(_In_ otInstance *otCtx, uint16_t panid)
|
||||
}
|
||||
}
|
||||
|
||||
void otPlatRadioSetExtendedAddress(_In_ otInstance *otCtx, uint8_t *address)
|
||||
void otPlatRadioSetExtendedAddress(_In_ otInstance *otCtx, const otExtAddress *address)
|
||||
{
|
||||
NT_ASSERT(otCtx);
|
||||
PMS_FILTER pFilter = otCtxToFilter(otCtx);
|
||||
@@ -223,7 +223,7 @@ void otPlatRadioSetExtendedAddress(_In_ otInstance *otCtx, uint8_t *address)
|
||||
|
||||
for (size_t i = 0; i < OT_EXT_ADDRESS_SIZE; i++)
|
||||
{
|
||||
extAddr.bytes[i] = address[7 - i];
|
||||
extAddr.bytes[i] = address->m8[7 - i];
|
||||
}
|
||||
|
||||
// Indicate to the miniport
|
||||
@@ -654,7 +654,7 @@ otError otPlatRadioAddSrcMatchShortEntry(_In_ otInstance *otCtx, const uint16_t
|
||||
return NT_SUCCESS(status) ? OT_ERROR_NONE : OT_ERROR_FAILED;
|
||||
}
|
||||
|
||||
otError otPlatRadioAddSrcMatchExtEntry(_In_ otInstance *otCtx, const uint8_t *aExtAddress)
|
||||
otError otPlatRadioAddSrcMatchExtEntry(_In_ otInstance *otCtx, const otExtAddress *aExtAddress)
|
||||
{
|
||||
NT_ASSERT(otCtx);
|
||||
PMS_FILTER pFilter = otCtxToFilter(otCtx);
|
||||
@@ -696,7 +696,7 @@ otError otPlatRadioClearSrcMatchShortEntry(_In_ otInstance *otCtx, const uint16_
|
||||
return NT_SUCCESS(status) ? OT_ERROR_NONE : OT_ERROR_FAILED;
|
||||
}
|
||||
|
||||
otError otPlatRadioClearSrcMatchExtEntry(_In_ otInstance *otCtx, const uint8_t *aExtAddress)
|
||||
otError otPlatRadioClearSrcMatchExtEntry(_In_ otInstance *otCtx, const otExtAddress *aExtAddress)
|
||||
{
|
||||
NT_ASSERT(otCtx);
|
||||
PMS_FILTER pFilter = otCtxToFilter(otCtx);
|
||||
|
||||
@@ -596,7 +596,7 @@ otLwfTunValueInserted(
|
||||
NotifEntry->Notif.NotifType = OTLWF_NOTIF_ACTIVE_SCAN;
|
||||
NotifEntry->Notif.ActiveScanPayload.Valid = TRUE;
|
||||
|
||||
const uint8_t *aExtAddr = NULL;
|
||||
const otExtAddress *aExtAddr = NULL;
|
||||
const uint8_t *aExtPanId = NULL;
|
||||
const char *aNetworkName = NULL;
|
||||
unsigned int xpanid_len = 0;
|
||||
|
||||
@@ -1172,7 +1172,7 @@ OTNODEAPI const char* OTCALL otNodeGetAddr64(otNode* aNode)
|
||||
{
|
||||
aNode->mMemoryToFree.push_back(str);
|
||||
for (int i = 0; i < 8; i++)
|
||||
sprintf_s(str + i * 2, 18 - (2 * i), "%02x", extAddr[i]);
|
||||
sprintf_s(str + i * 2, 18 - (2 * i), "%02x", extAddr->m8[i]);
|
||||
printf("%d: extaddr\r\n%s\r\n", aNode->mId, str);
|
||||
}
|
||||
otFreeMemory(extAddr);
|
||||
|
||||
Reference in New Issue
Block a user