AnsweredAssumed Answered

ENET_get_mac_address bug?

Question asked by Raj Batra on Dec 9, 2015
Latest reply on Dec 17, 2015 by Raj Batra

Looking at ENET_get_mac_address in fsl_enet_rtcs_adapter.c (KSDK 1.2), setting address[3] seems to have an extra '0' in the filter (see Red).

 

 

uint32_t ENET_get_mac_address(uint32_t device, uint32_t value, _enet_address address)

{

    uint8_t g_enetAddress[kEnetMacAddrLen] = ENET_DEFAULT_MAC_ADD;

 

 

    address[0] = g_enetAddress[0];

    address[1] = g_enetAddress[1];

    address[2] = g_enetAddress[2];

    address[3] = (value & 0xFF00000U)>>16;

    address[4] = (value & 0xFF00U) >> 8;

    address[5] = (value & 0xFFU);

 

 

    return ENET_OK;

}

 

Am I missing something?

Outcomes