components/esp_eth/src/esp_eth_mac_dm9051.c
/**
 * @brief start dm9051: enable interrupt and start receive
 */
@brief start dm9051: enable interrupt and start receive
@brief start dm9051 : enable interrupt and start receive
static esp_err_t emac_dm9051_start(esp_eth_mac_t *mac)
{
    esp_err_t ret = ESP_OK;
    emac_dm9051_t *emac = __containerof(mac, emac_dm9051_t, parent);
    ESP_GOTO_ON_ERROR(dm9051_register_write(emac, DM9051_IMR, IMR_PAR | IMR_PRI), err, TAG, "write IMR failed");
    uint8_t rcr = 0;
    ESP_GOTO_ON_ERROR(dm9051_register_read(emac, DM9051_RCR, &rcr), err, TAG, "read RCR failed");
    rcr |= RCR_RXEN;
    ESP_GOTO_ON_ERROR(dm9051_register_write(emac, DM9051_RCR, rcr), err, TAG, "write RCR failed");
    return ESP_OK;
err:
    return ret;
}
static esp_err_t emac_dm9051_start ( esp_eth_mac_t * mac ) { esp_err_t ret = ESP_OK ; emac_dm9051_t * emac = __containerof ( mac , emac_dm9051_t , parent ) ; ESP_GOTO_ON_ERROR ( dm9051_register_write ( emac , DM9051_IMR , IMR_PAR | IMR_PRI ) , err , TAG , " " ) ; uint8_t rcr = 0 ; ESP_GOTO_ON_ERROR ( dm9051_register_read ( emac , DM9051_RCR , & rcr ) , err , TAG , " " ) ; rcr |= RCR_RXEN ; ESP_GOTO_ON_ERROR ( dm9051_register_write ( emac , DM9051_RCR , rcr ) , err , TAG , " " ) ; return ESP_OK ; err : return ret ; }
@brief start dm9051: enable interrupt and start receive
@brief start dm9051 : enable interrupt and start receive
/* enable only Rx related interrupts as others are processed synchronously */ /* enable rx */