CMSIS-Driver
Version 2.7.1
Peripheral Interface for Middleware and Application Code
|
Ethernet common definitions (Driver_ETH.h) More...
Content | |
Media Interface Types | |
Ethernet Media Interface type. | |
Ethernet MAC Interface | |
Driver API for Ethernet MAC Peripheral (Driver_ETH_MAC.h) | |
Ethernet PHY Interface | |
Driver API for Ethernet PHY Peripheral (Driver_ETH_PHY.h) | |
Data Structures | |
struct | ARM_ETH_LINK_INFO |
Ethernet link information. More... | |
struct | ARM_ETH_MAC_ADDR |
Ethernet MAC Address. More... | |
Enumerations | |
enum | ARM_ETH_LINK_STATE { ARM_ETH_LINK_DOWN, ARM_ETH_LINK_UP } |
Ethernet link state. More... | |
Ethernet common definitions (Driver_ETH.h)
Ethernet is a networking technology for exchanging data packages between computer systems. Several microcontrollers integrate an Ethernet MAC (Media Access Control) data-link layer that interfaces to an Ethernet PHY (Physical Interface Transceiver).
Wikipedia offers more information about the Ethernet.
Block Diagram
The Ethernet PHY connects typically to the Ethernet MAC using an MII (Media Independent Interface) or RMII (Reduced Media Independent Interface).
Ethernet API
The following header files define the Application Programming Interface (API) for the Ethernet interface:
The driver implementation of the Ethernet MAC is a typical part of a Device Family Pack (DFP) that supports the peripherals of the microcontroller family. The driver implementation of the Ethernet PHY is a typical part of a Network Software Pack, since PHY is typically not integrated into the microcontroller.
Driver Functions
The driver functions are published in the access struct as explained in Common Driver Functions
Both drivers are used in combination and usually the Ethernet MAC provides a media interface to the Ethernet PHY. A typical setup sequence for the drivers is shown below:
Example Code
The following example code shows the usage of the Ethernet interface.
struct ARM_ETH_LINK_INFO |
struct ARM_ETH_MAC_ADDR |
Ethernet MAC Address.
Stores the MAC Address of the Ethernet interface as defined by IEEE 802. Wikipedia offers more information about the MAC Address.
Parameter for:
Data Fields | ||
---|---|---|
uint8_t | b[6] | MAC Address (6 bytes), MSB first. |
enum ARM_ETH_LINK_STATE |