WebRadioApp  0.1
ethernetif.c File Reference

Initialization code for ETH/LwIP middleWare. (partially based on examples that are provided within the STM32 cube firmware) More...

#include "main.h"
#include "lwip/opt.h"
#include "lwip/mem.h"
#include "lwip/memp.h"
#include "lwip/timeouts.h"
#include "netif/ethernet.h"
#include "netif/etharp.h"
#include "lwip/ethip6.h"
#include "ethernetif.h"
#include "lan8742.h"
#include <string.h>
Include dependency graph for ethernetif.c:

Macros

#define IFNAME0   's'
 
#define IFNAME1   't'
 
#define ETH_DMA_TRANSMIT_TIMEOUT   (20U)
 

Functions

 LWIP_MEMPOOL_DECLARE (RX_POOL, 10, sizeof(struct pbuf_custom), "Zero-copy RX PBUF pool")
 
int32_t ETH_PHY_IO_Init (void)
 Initializes the MDIO interface GPIO and clocks. More...
 
int32_t ETH_PHY_IO_DeInit (void)
 De-Initializes the MDIO interface . More...
 
int32_t ETH_PHY_IO_ReadReg (uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal)
 Read a PHY register through the MDIO interface. More...
 
int32_t ETH_PHY_IO_WriteReg (uint32_t DevAddr, uint32_t RegAddr, uint32_t RegVal)
 Write a value to a PHY register through the MDIO interface. More...
 
int32_t ETH_PHY_IO_GetTick (void)
 Get the time in millisecons used for internal PHY driver process. More...
 
void pbuf_free_custom (struct pbuf *p)
 Custom Rx pbuf free callback. More...
 
void Error_Handler (void)
 This function is executed in case of error occurrence. More...
 
void HAL_ETH_MspInit (ETH_HandleTypeDef *ethHandle)
 
void HAL_ETH_MspDeInit (ETH_HandleTypeDef *ethHandle)
 
static void low_level_init (struct netif *netif)
 In this function, the hardware should be initialized. Called from ethernetif_init(). More...
 
static err_t low_level_output (struct netif *netif, struct pbuf *p)
 
static struct pbuf * low_level_input (struct netif *netif)
 
void ethernetif_input (struct netif *netif)
 
static err_t low_level_output_arp_off (struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
 
err_t ethernetif_init (struct netif *netif)
 
u32_t sys_jiffies (void)
 Returns the current time in milliseconds when LWIP_TIMERS == 1 and NO_SYS == 1. More...
 
u32_t sys_now (void)
 Returns the current time in milliseconds when LWIP_TIMERS == 1 and NO_SYS == 1. More...
 
void ethernet_link_check_state (struct netif *netif)
 Check the ETH link state then update ETH driver and netif link accordingly. More...
 

Variables

ETH_HandleTypeDef heth
 
ETH_TxPacketConfig TxConfig
 
lan8742_Object_t LAN8742
 
lan8742_IOCtx_t LAN8742_IOCtx
 

Detailed Description

Initialization code for ETH/LwIP middleWare. (partially based on examples that are provided within the STM32 cube firmware)

Author
Kevin Bello (k.bel.nosp@m.lo@t.nosp@m.um.de)
Version
0.1
Date
2021-04-17