Skip to content

Commit

Permalink
fixed wrong endian format of EUI64
Browse files Browse the repository at this point in the history
  • Loading branch information
Haerteleric committed Feb 2, 2024
1 parent 61542b2 commit 34767bd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/OT-HAL/otPlatRadio.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *a_instance_p)
void otPlatRadioGetIeeeEui64(otInstance *a_instance_p, uint8_t *a_ieeeEui64_p)
{
OT_UNUSED_VARIABLE(a_instance_p);
samr21Nvm_getIeeeAddr(a_ieeeEui64_p);

uint8_t wrongEndianIeeeAddr[IEEE_15_4_EXTENDED_ADDR_SIZE];
samr21Nvm_getIeeeAddr(wrongEndianIeeeAddr);

for (unsigned int i = 0; i < IEEE_15_4_EXTENDED_ADDR_SIZE; i++)
{
a_ieeeEui64_p[IEEE_15_4_EXTENDED_ADDR_SIZE - 1 - i] = wrongEndianIeeeAddr[i];
}
}

void otPlatRadioSetPanId(otInstance *a_instance_p, otPanId a_panId)
Expand Down

0 comments on commit 34767bd

Please sign in to comment.