1 /* 2 * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #pragma once 7 8 /** 9 * @brief Ethernet interface 10 * 11 */ 12 typedef enum { 13 EMAC_DATA_INTERFACE_RMII, /*!< Reduced Media Independent Interface */ 14 EMAC_DATA_INTERFACE_MII, /*!< Media Independent Interface */ 15 } eth_data_interface_t; 16 17 /** 18 * @brief Ethernet link status 19 * 20 */ 21 typedef enum { 22 ETH_LINK_UP, /*!< Ethernet link is up */ 23 ETH_LINK_DOWN /*!< Ethernet link is down */ 24 } eth_link_t; 25 26 /** 27 * @brief Ethernet speed 28 * 29 */ 30 typedef enum { 31 ETH_SPEED_10M, /*!< Ethernet speed is 10Mbps */ 32 ETH_SPEED_100M, /*!< Ethernet speed is 100Mbps */ 33 ETH_SPEED_MAX /*!< Max speed mode (for checking purpose) */ 34 } eth_speed_t; 35 36 /** 37 * @brief Ethernet duplex mode 38 * 39 */ 40 typedef enum { 41 ETH_DUPLEX_HALF, /*!< Ethernet is in half duplex */ 42 ETH_DUPLEX_FULL, /*!< Ethernet is in full duplex */ 43 } eth_duplex_t; 44 45 /** 46 * @brief Ethernet Checksum 47 */ 48 typedef enum { 49 ETH_CHECKSUM_SW, /*!< Ethernet checksum calculate by software */ 50 ETH_CHECKSUM_HW /*!< Ethernet checksum calculate by hardware */ 51 } eth_checksum_t; 52 53 /** 54 * @brief Internal ethernet EMAC's DMA available burst sizes 55 */ 56 typedef enum { 57 ETH_DMA_BURST_LEN_32, 58 ETH_DMA_BURST_LEN_16, 59 ETH_DMA_BURST_LEN_8, 60 ETH_DMA_BURST_LEN_4, 61 ETH_DMA_BURST_LEN_2, 62 ETH_DMA_BURST_LEN_1, 63 } eth_mac_dma_burst_len_t; 64