]> begriffs open source - cmsis/blob - CMSIS/Driver/Include/Driver_ETH.h
RTOS2 doc: updated revision history
[cmsis] / CMSIS / Driver / Include / Driver_ETH.h
1 /*
2  * Copyright (c) 2013-2016 ARM Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  * $Date:        7. Mar 2014
19  * $Revision:    V2.00
20  *
21  * Project:      Ethernet PHY and MAC Driver common definitions
22  */
23
24 /* History:
25  *  Version 2.00
26  *    Removed ARM_ETH_STATUS enumerator
27  *    Removed ARM_ETH_MODE enumerator
28  *  Version 1.10
29  *    Namespace prefix ARM_ added
30  *  Version 1.00
31  *    Initial release
32  */
33
34 #ifndef __DRIVER_ETH_H
35 #define __DRIVER_ETH_H
36
37 #include "Driver_Common.h"
38
39 /**
40 \brief Ethernet Media Interface type
41 */
42 #define ARM_ETH_INTERFACE_MII           0       ///< Media Independent Interface (MII)
43 #define ARM_ETH_INTERFACE_RMII          1       ///< Reduced Media Independent Interface (RMII)
44 #define ARM_ETH_INTERFACE_SMII          2       ///< Serial Media Independent Interface (SMII)
45
46 /**
47 \brief Ethernet link speed
48 */
49 #define ARM_ETH_SPEED_10M               0       ///< 10 Mbps link speed
50 #define ARM_ETH_SPEED_100M              1       ///< 100 Mbps link speed
51 #define ARM_ETH_SPEED_1G                2       ///< 1 Gpbs link speed
52
53 /**
54 \brief Ethernet duplex mode
55 */
56 #define ARM_ETH_DUPLEX_HALF             0       ///< Half duplex link
57 #define ARM_ETH_DUPLEX_FULL             1       ///< Full duplex link
58
59 /**
60 \brief Ethernet link state
61 */
62 typedef enum _ARM_ETH_LINK_STATE {
63   ARM_ETH_LINK_DOWN,                    ///< Link is down
64   ARM_ETH_LINK_UP                       ///< Link is up
65 } ARM_ETH_LINK_STATE;
66
67 /**
68 \brief Ethernet link information
69 */
70 typedef struct _ARM_ETH_LINK_INFO {
71   uint32_t speed  : 2;                  ///< Link speed: 0= 10 MBit, 1= 100 MBit, 2= 1 GBit
72   uint32_t duplex : 1;                  ///< Duplex mode: 0= Half, 1= Full
73 } ARM_ETH_LINK_INFO;
74
75 /**
76 \brief Ethernet MAC Address
77 */
78 typedef struct _ARM_ETH_MAC_ADDR {
79   uint8_t b[6];                         ///< MAC Address (6 bytes), MSB first
80 } ARM_ETH_MAC_ADDR;
81
82 #endif /* __DRIVER_ETH_H */