![]() |
STM32Cube
Version 2.0
Create Projects for STM32H7 Series with STM32Cube HAL and STM32CubeMX
|
#include "EMAC_STM32H7xx.h"
Macros | |
#define | EMAC_TXBUF_ADDRESS 0x30042000 |
#define | EMAC_CHECKSUM_OFFLOAD 1 |
#define | EMAC_TIME_STAMP 0 |
#define | ARM_ETH_MAC_DRV_VERSION ARM_DRIVER_VERSION_MAJOR_MINOR(1,0) |
Functions | |
static uint8_t TX_Buff[ETH_TX_DESC_CNT][ETH_MAX_PACKET_SIZE] | __MEM_AT (EMAC_TXBUF_ADDRESS) |
static uint32_t | crc32_8bit_rev (uint32_t crc32, uint8_t val) |
Calculate 32-bit CRC (Polynomial: 0x04C11DB7, data bit-reversed). More... | |
static uint32_t | crc32_data (const uint8_t *data, uint32_t len) |
Calculate standard 32-bit Ethernet CRC. More... | |
static ARM_DRIVER_VERSION | GetVersion (void) |
Get driver version. More... | |
static ARM_ETH_MAC_CAPABILITIES | GetCapabilities (void) |
Get driver capabilities. More... | |
static int32_t | Initialize (ARM_ETH_MAC_SignalEvent_t cb_event) |
Initialize Ethernet MAC Device. More... | |
static int32_t | Uninitialize (void) |
De-initialize Ethernet MAC Device. More... | |
static int32_t | PowerControl (ARM_POWER_STATE state) |
Control Ethernet MAC Device Power. More... | |
static int32_t | GetMacAddress (ARM_ETH_MAC_ADDR *ptr_addr) |
Get Ethernet MAC Address. More... | |
static int32_t | SetMacAddress (const ARM_ETH_MAC_ADDR *ptr_addr) |
Set Ethernet MAC Address. More... | |
static int32_t | SetAddressFilter (const ARM_ETH_MAC_ADDR *ptr_addr, uint32_t num_addr) |
Configure Address Filter. More... | |
static int32_t | SendFrame (const uint8_t *frame, uint32_t len, uint32_t flags) |
Send Ethernet frame. More... | |
static int32_t | ReadFrame (uint8_t *frame, uint32_t len) |
Read data of received Ethernet frame. More... | |
static uint32_t | GetRxFrameSize (void) |
Get size of received Ethernet frame. More... | |
static int32_t | GetRxFrameTime (ARM_ETH_MAC_TIME *time) |
Get time of received Ethernet frame. More... | |
static int32_t | GetTxFrameTime (ARM_ETH_MAC_TIME *time) |
Get time of transmitted Ethernet frame. More... | |
static int32_t | ControlTimer (uint32_t control, ARM_ETH_MAC_TIME *time) |
Control Precision Timer. More... | |
static int32_t | Control (uint32_t control, uint32_t arg) |
Control Ethernet Interface. More... | |
static int32_t | PHY_Read (uint8_t phy_addr, uint8_t reg_addr, uint16_t *data) |
Read Ethernet PHY Register through Management Interface. More... | |
static int32_t | PHY_Write (uint8_t phy_addr, uint8_t reg_addr, uint16_t data) |
Write Ethernet PHY Register through Management Interface. More... | |
void | HAL_ETH_TxCpltCallback (ETH_HandleTypeDef *heth) |
void | HAL_ETH_RxCpltCallback (ETH_HandleTypeDef *heth) |
void | HAL_ETH_PMTCallback (ETH_HandleTypeDef *heth) |
Variables | |
ETH_HandleTypeDef | heth |
ETH_DMADescTypeDef | DMARxDscrTab [ETH_RX_DESC_CNT] |
ETH_DMADescTypeDef | DMATxDscrTab [ETH_TX_DESC_CNT] |
uint8_t | Rx_Buff [ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE] |
static const ARM_DRIVER_VERSION | DriverVersion |
static const ARM_ETH_MAC_CAPABILITIES | DriverCapabilities |
static EMAC_CTRL | Emac |
static ETH_MACConfigTypeDef | MAC_Config |
static ETH_MACFilterConfigTypeDef | MAC_Filter |
static ETH_TxPacketConfig | TX_Config |
ARM_DRIVER_ETH_MAC | Driver_ETH_MAC0 |
#define ARM_ETH_MAC_DRV_VERSION ARM_DRIVER_VERSION_MAJOR_MINOR(1,0) |
#define EMAC_CHECKSUM_OFFLOAD 1 |
#define EMAC_TIME_STAMP 0 |
#define EMAC_TXBUF_ADDRESS 0x30042000 |
|
static |
|
static |
[in] | control | operation |
[in] | arg | argument of operation (optional) |
|
static |
[in] | control | operation |
[in] | time | Pointer to time structure |
|
static |
[in] | crc32 | CRC initial value |
[in] | val | Input value |
|
static |
[in] | data | Pointer to buffer containing the data |
[in] | len | Data length in bytes |
|
static |
|
static |
[in] | ptr_addr | Pointer to address |
|
static |
|
static |
[in] | time | Pointer to time structure for data to read into |
|
static |
[in] | time | Pointer to time structure for data to read into |
|
static |
void HAL_ETH_PMTCallback | ( | ETH_HandleTypeDef * | heth | ) |
void HAL_ETH_RxCpltCallback | ( | ETH_HandleTypeDef * | heth | ) |
void HAL_ETH_TxCpltCallback | ( | ETH_HandleTypeDef * | heth | ) |
|
static |
[in] | cb_event | Pointer to ARM_ETH_MAC_SignalEvent |
|
static |
[in] | phy_addr | 5-bit device address |
[in] | reg_addr | 5-bit register address |
[out] | data | Pointer where the result is written to |
|
static |
[in] | phy_addr | 5-bit device address |
[in] | reg_addr | 5-bit register address |
[in] | data | 16-bit data to write |
|
static |
[in] | state | Power state |
|
static |
[in] | frame | Pointer to frame buffer for data to read into |
[in] | len | Frame buffer length in bytes |
|
static |
[in] | frame | Pointer to frame buffer with data to send |
[in] | len | Frame buffer length in bytes |
[in] | flags | Frame transmit flags (see ARM_ETH_MAC_TX_FRAME_...) |
|
static |
[in] | ptr_addr | Pointer to addresses |
[in] | num_addr | Number of addresses to configure |
|
static |
[in] | ptr_addr | Pointer to address |
|
static |
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] |
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] |
ARM_DRIVER_ETH_MAC Driver_ETH_MAC0 |
|
static |
|
static |
|
static |
ETH_HandleTypeDef heth |
|
static |
|
static |
uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE] |
|
static |