src/ENC28J60.c
static int8_t enc28j60_set_mac_addr(struct net_dev_s *net_dev, const void *addr) {
    // struct sock_addr *a = addr;
    if (net_dev_upstate_is_run(net_dev)) {
        // Device must be disable
        // EBUSY
        return -1;
    }

    memcpy(net_dev->dev_addr, addr, ETH_MAC_LEN);
    
    return enc28j60_write_mac_addr(net_dev->priv);
}
/*!
 * @brief Set the new MAC address. Device must be disable to set MAC addr
 * @param mac Pointer to buffer with new MAC addr (struct sock_addr???)
 * @return 0 if success, errno if error
 */
@brief Set the new MAC address. Device must be disable to set MAC addr
@param mac Pointer to buffer with new MAC addr (struct sock_addr???)
@return 0 if success, errno if error
@brief Set the new MAC address . Device must be disable to set MAC addr @param mac Pointer to buffer with new MAC addr ( struct sock_addr??? ) @return 0 if success errno if error
static int8_t enc28j60_set_mac_addr(struct net_dev_s *net_dev, const void *addr) {
    if (net_dev_upstate_is_run(net_dev)) {
        return -1;
    }
    memcpy(net_dev->dev_addr, addr, ETH_MAC_LEN);
    return enc28j60_write_mac_addr(net_dev->priv);
}
static int8_t enc28j60_set_mac_addr ( struct net_dev_s * net_dev , const void * addr ) { if ( net_dev_upstate_is_run ( net_dev ) ) { return -1 ; } memcpy ( net_dev -> dev_addr , addr , ETH_MAC_LEN ) ; return enc28j60_write_mac_addr ( net_dev -> priv ) ; }
@brief Set the new MAC address.
@brief Set the new MAC address .
// struct sock_addr *a = addr; // Device must be disable // EBUSY