2 * Copyright (c) 2013-2017 ARM Limited. All rights reserved.
4 * SPDX-License-Identifier: Apache-2.0
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * Project: Ethernet PHY and MAC Driver common definitions
26 * ARM_ETH_LINK_INFO made volatile
28 * Removed ARM_ETH_STATUS enumerator
29 * Removed ARM_ETH_MODE enumerator
31 * Namespace prefix ARM_ added
39 #include "Driver_Common.h"
42 \brief Ethernet Media Interface type
44 #define ARM_ETH_INTERFACE_MII (0) ///< Media Independent Interface (MII)
45 #define ARM_ETH_INTERFACE_RMII (1) ///< Reduced Media Independent Interface (RMII)
46 #define ARM_ETH_INTERFACE_SMII (2) ///< Serial Media Independent Interface (SMII)
49 \brief Ethernet link speed
51 #define ARM_ETH_SPEED_10M (0) ///< 10 Mbps link speed
52 #define ARM_ETH_SPEED_100M (1) ///< 100 Mbps link speed
53 #define ARM_ETH_SPEED_1G (2) ///< 1 Gpbs link speed
56 \brief Ethernet duplex mode
58 #define ARM_ETH_DUPLEX_HALF (0) ///< Half duplex link
59 #define ARM_ETH_DUPLEX_FULL (1) ///< Full duplex link
62 \brief Ethernet link state
64 typedef enum _ARM_ETH_LINK_STATE {
65 ARM_ETH_LINK_DOWN, ///< Link is down
66 ARM_ETH_LINK_UP ///< Link is up
70 \brief Ethernet link information
72 typedef volatile struct _ARM_ETH_LINK_INFO {
73 uint32_t speed : 2; ///< Link speed: 0= 10 MBit, 1= 100 MBit, 2= 1 GBit
74 uint32_t duplex : 1; ///< Duplex mode: 0= Half, 1= Full
75 uint32_t reserved : 29;
79 \brief Ethernet MAC Address
81 typedef struct _ARM_ETH_MAC_ADDR {
82 uint8_t b[6]; ///< MAC Address (6 bytes), MSB first
85 #endif /* DRIVER_ETH_H_ */