/hal_espressif-3.6.0/components/esp_eth/src/ |
D | esp_eth_mac_esp.c | 66 static void esp_emac_free_driver_obj(emac_esp32_t *emac, void *descriptors); 74 emac_esp32_t *emac = __containerof(mac, emac_esp32_t, parent); in emac_esp32_set_mediator() local 75 emac->eth = eth; in emac_esp32_set_mediator() 84 emac_esp32_t *emac = __containerof(mac, emac_esp32_t, parent); in emac_esp32_write_phy_reg() local 85 …ESP_GOTO_ON_FALSE(!emac_ll_is_mii_busy(emac->hal.mac_regs), ESP_ERR_INVALID_STATE, err, TAG, "phy … in emac_esp32_write_phy_reg() 86 emac_ll_set_phy_data(emac->hal.mac_regs, reg_value); in emac_esp32_write_phy_reg() 87 emac_hal_set_phy_cmd(&emac->hal, phy_addr, phy_reg, true); in emac_esp32_write_phy_reg() 93 busy = emac_ll_is_mii_busy(emac->hal.mac_regs); in emac_esp32_write_phy_reg() 106 emac_esp32_t *emac = __containerof(mac, emac_esp32_t, parent); in emac_esp32_read_phy_reg() local 107 …ESP_GOTO_ON_FALSE(!emac_ll_is_mii_busy(emac->hal.mac_regs), ESP_ERR_INVALID_STATE, err, TAG, "phy … in emac_esp32_read_phy_reg() [all …]
|
D | esp_eth_mac_dm9051.c | 54 static inline bool dm9051_lock(emac_dm9051_t *emac) in dm9051_lock() argument 56 return xSemaphoreTake(emac->spi_lock, pdMS_TO_TICKS(DM9051_SPI_LOCK_TIMEOUT_MS)) == pdTRUE; in dm9051_lock() 59 static inline bool dm9051_unlock(emac_dm9051_t *emac) in dm9051_unlock() argument 61 return xSemaphoreGive(emac->spi_lock) == pdTRUE; in dm9051_unlock() 67 static esp_err_t dm9051_register_write(emac_dm9051_t *emac, uint8_t reg_addr, uint8_t value) in dm9051_register_write() argument 77 if (dm9051_lock(emac)) { in dm9051_register_write() 78 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in dm9051_register_write() 82 dm9051_unlock(emac); in dm9051_register_write() 92 static esp_err_t dm9051_register_read(emac_dm9051_t *emac, uint8_t reg_addr, uint8_t *value) in dm9051_register_read() argument 101 if (dm9051_lock(emac)) { in dm9051_register_read() [all …]
|
D | esp_eth_mac_ksz8851snl.c | 61 emac_ksz8851snl_t *emac = (emac_ksz8851snl_t *)arg; in ksz8851_isr_handler() local 63 vTaskNotifyGiveFromISR(emac->rx_task_hdl, &high_task_wakeup); in ksz8851_isr_handler() 69 static inline bool ksz8851_mutex_lock(emac_ksz8851snl_t *emac) in ksz8851_mutex_lock() argument 71 …return xSemaphoreTakeRecursive(emac->spi_lock, pdMS_TO_TICKS(KSZ8851_SPI_LOCK_TIMEOUT_MS)) == pdTR… in ksz8851_mutex_lock() 74 static inline bool ksz8851_mutex_unlock(emac_ksz8851snl_t *emac) in ksz8851_mutex_unlock() argument 76 return xSemaphoreGiveRecursive(emac->spi_lock) == pdTRUE; in ksz8851_mutex_unlock() 79 static esp_err_t ksz8851_read_reg(emac_ksz8851snl_t *emac, uint32_t address, uint16_t *value) in ksz8851_read_reg() argument 98 if (ksz8851_mutex_lock(emac)) { in ksz8851_read_reg() 99 if (spi_device_polling_transmit(emac->spi_hdl, &trans.base) != ESP_OK) { in ksz8851_read_reg() 103 ksz8851_mutex_unlock(emac); in ksz8851_read_reg() [all …]
|
D | esp_eth_mac_w5500.c | 52 static inline bool w5500_lock(emac_w5500_t *emac) in w5500_lock() argument 54 return xSemaphoreTake(emac->spi_lock, pdMS_TO_TICKS(W5500_SPI_LOCK_TIMEOUT_MS)) == pdTRUE; in w5500_lock() 57 static inline bool w5500_unlock(emac_w5500_t *emac) in w5500_unlock() argument 59 return xSemaphoreGive(emac->spi_lock) == pdTRUE; in w5500_unlock() 62 static esp_err_t w5500_write(emac_w5500_t *emac, uint32_t address, const void *value, uint32_t len) in w5500_write() argument 72 if (w5500_lock(emac)) { in w5500_write() 73 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in w5500_write() 77 w5500_unlock(emac); in w5500_write() 84 static esp_err_t w5500_read(emac_w5500_t *emac, uint32_t address, void *value, uint32_t len) in w5500_read() argument 95 if (w5500_lock(emac)) { in w5500_read() [all …]
|
D | esp_eth_mac_openeth.c | 60 emac_opencores_t *emac = (emac_opencores_t *) args; in emac_opencores_isr_handler() local 67 vTaskNotifyGiveFromISR(emac->rx_task_hdl, &high_task_wakeup); in emac_opencores_isr_handler() 83 emac_opencores_t *emac = (emac_opencores_t *)arg; in emac_opencores_rx_task() local 93 } else if (emac_opencores_receive(&emac->parent, buffer, &length) == ESP_OK) { in emac_opencores_rx_task() 96 emac->eth->stack_input(emac->eth, buffer, length); in emac_opencores_rx_task() 117 emac_opencores_t *emac = __containerof(mac, emac_opencores_t, parent); in emac_opencores_set_mediator() local 118 emac->eth = eth; in emac_opencores_set_mediator() 153 emac_opencores_t *emac = __containerof(mac, emac_opencores_t, parent); in emac_opencores_set_addr() local 154 memcpy(emac->addr, addr, 6); in emac_opencores_set_addr() 172 emac_opencores_t *emac = __containerof(mac, emac_opencores_t, parent); in emac_opencores_get_addr() local [all …]
|
/hal_espressif-3.6.0/examples/ethernet/enc28j60/components/eth_enc28j60/ |
D | esp_eth_mac_enc28j60.c | 131 static inline bool enc28j60_spi_lock(emac_enc28j60_t *emac) in enc28j60_spi_lock() argument 133 return xSemaphoreTake(emac->spi_lock, pdMS_TO_TICKS(ENC28J60_SPI_LOCK_TIMEOUT_MS)) == pdTRUE; in enc28j60_spi_lock() 136 static inline bool enc28j60_spi_unlock(emac_enc28j60_t *emac) in enc28j60_spi_unlock() argument 138 return xSemaphoreGive(emac->spi_lock) == pdTRUE; in enc28j60_spi_unlock() 141 static inline bool enc28j60_reg_trans_lock(emac_enc28j60_t *emac) in enc28j60_reg_trans_lock() argument 143 …return xSemaphoreTake(emac->reg_trans_lock, pdMS_TO_TICKS(ENC28J60_REG_TRANS_LOCK_TIMEOUT_MS)) == … in enc28j60_reg_trans_lock() 146 static inline bool enc28j60_reg_trans_unlock(emac_enc28j60_t *emac) in enc28j60_reg_trans_unlock() argument 148 return xSemaphoreGive(emac->reg_trans_lock) == pdTRUE; in enc28j60_reg_trans_unlock() 182 static esp_err_t enc28j60_do_register_write(emac_enc28j60_t *emac, uint8_t reg_addr, uint8_t value) in enc28j60_do_register_write() argument 194 if (enc28j60_spi_lock(emac)) { in enc28j60_do_register_write() [all …]
|
/hal_espressif-3.6.0/components/esp_eth/include/ |
D | esp_eth.h | 136 #define ETH_DEFAULT_CONFIG(emac, ephy) \ argument 138 .mac = emac, \
|
/hal_espressif-3.6.0/examples/ethernet/eth2ap/ |
D | README.md | 61 I (518) emac: emac reset done
|