src/ENC28J60.c
static int8_t enc28j60_open(struct net_dev_s *net_dev) {
    struct enc28j60_dev *priv = net_dev->priv;

    enc28j60_disable(net_dev);
    if (enc28j60_init(priv)) {
        // errno
        return -1;
    }
    enc28j60_write_mac_addr(priv);
    enc28j60_enable(priv);
    enc28j60_check_link(priv);
    net_dev_tx_allow(net_dev);

    return 0;
}
/*!
 * @brief Puts this device into working state.
 * Also, the duplex settings will only take effect after enc28j60_init().
 * @return 0 if success; errno if error
 */
@brief Puts this device into working state.
Also, the duplex settings will only take effect after enc28j60_init().
@return 0 if success; errno if error
@brief Puts this device into working state . Also the duplex settings will only take effect after enc28j60_init () . @return 0 if success ; errno if error
static int8_t enc28j60_open(struct net_dev_s *net_dev) {
    struct enc28j60_dev *priv = net_dev->priv;
    enc28j60_disable(net_dev);
    if (enc28j60_init(priv)) {
        return -1;
    }
    enc28j60_write_mac_addr(priv);
    enc28j60_enable(priv);
    enc28j60_check_link(priv);
    net_dev_tx_allow(net_dev);
    return 0;
}
static int8_t enc28j60_open ( struct net_dev_s * net_dev ) { struct enc28j60_dev * priv = net_dev -> priv ; enc28j60_disable ( net_dev ) ; if ( enc28j60_init ( priv ) ) { return -1 ; } enc28j60_write_mac_addr ( priv ) ; enc28j60_enable ( priv ) ; enc28j60_check_link ( priv ) ; net_dev_tx_allow ( net_dev ) ; return 0 ; }
@brief Puts this device into working state.
@brief Puts this device into working state .
// errno