Skip to content

Instantly share code, notes, and snippets.

@jhgorse
Created June 29, 2013 12:06
Show Gist options
  • Save jhgorse/5890893 to your computer and use it in GitHub Desktop.
Save jhgorse/5890893 to your computer and use it in GitHub Desktop.
Trying to dereference the mac_address within MACDriver.MACConfig
int fnet_stm32_set_hw_addr(fnet_netif_t *netif, unsigned char * hw_addr)
{
unsigned i;
(void)netif;
////MACDriver *ethif = (MACDriver *)((fnet_eth_if_t *)(netif->if_ptr))->if_cpu_ptr);
//MACConfig *config = ETHD1.config;
//fnet_mac_addr_t *mac_ptr = config->mac_address;
fnet_mac_addr_t *mac_ptr = ETHD1.config.mac_address;
for (i = 0; i < 6; i++)
(mac_ptr)[i] = (*hw_addr)[i];
return FNET_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment