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