Prusa MINI Firmware overview
lwip.h File Reference
#include "lwip/opt.h"
#include "lwip/mem.h"
#include "lwip/memp.h"
#include "netif/etharp.h"
#include "lwip/dhcp.h"
#include "lwip/netif.h"
#include "lwip/timeouts.h"
#include "ethernetif.h"
#include "stm32f4xx_hal.h"

Go to the source code of this file.

Functions

void MX_LWIP_Init (void)
 
void MX_LWIP_Process (void)
 

Variables

struct netif eth0
 
ETH_HandleTypeDef heth
 

Function Documentation

◆ MX_LWIP_Init()

void MX_LWIP_Init ( void  )

LwIP initialization function

95  {
96  /* Initilialize the LwIP stack with RTOS */
98 
99  /* IP addresses initialization with DHCP (IPv4) */
100  ipaddr.addr = 0;
101  netmask.addr = 0;
102  gw.addr = 0;
103 
104  /* add the network interface (IPv4/IPv6) with RTOS */
106 
107  /* Registers the default network interface */
109 
110  if (netif_is_link_up(&eth0)) {
111  /* When the netif is fully configured this function must be called */
112  netif_set_up(&eth0);
113  /* Start DHCP negotiation for a network interface (IPv4) */
114  dhcp_start(&eth0);
115  } else {
116  /* When the netif link is down this function must be called */
118  }
119 
120  /* USER CODE BEGIN 3 */
121  netif_set_link_callback(&eth0, netif_link_callback);
122  /* USER CODE END 3 */
123 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_LWIP_Process()

void MX_LWIP_Process ( void  )

Variable Documentation

◆ eth0

struct netif eth0

File Name : LWIP.h Description : This file provides code for the configuration of the LWIP.

This notice applies to any and all portions of this file that are not between comment pairs USER CODE BEGIN and USER CODE END. Other portions of this file, whether inserted by the user or by software development tools are owned by their respective copyright owners.

Copyright (c) 2019 STMicroelectronics International N.V. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:

  1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software without specific written permission.
  4. This software, including modifications and/or derivative works of this software, must execute solely and exclusively on microcontroller or microprocessor devices manufactured by or for STMicroelectronics.
  5. Redistribution and use of this software other than as permitted under this license is void and will automatically terminate your rights under this license.

THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ heth

ETH_HandleTypeDef heth
ethernetif_init
err_t ethernetif_init(struct netif *netif)
Definition: ethernetif.c:560
netif_set_up
void netif_set_up(struct netif *netif)
Definition: netif.c:624
netif_set_down
void netif_set_down(struct netif *netif)
Definition: netif.c:682
ipaddr
ip4_addr_t ipaddr
Definition: lwip.c:73
tcpip_init
void tcpip_init(tcpip_init_done_fn initfunc, void *arg)
Definition: tcpip.c:462
NULL
#define NULL
Definition: usbd_def.h:53
gw
ip4_addr_t gw
Definition: lwip.c:75
netif_is_link_up
#define netif_is_link_up(netif)
Definition: netif.h:413
netmask
ip4_addr_t netmask
Definition: lwip.c:74
tcpip_input
err_t tcpip_input(struct pbuf *p, struct netif *inp)
Definition: tcpip.c:212
eth0
struct netif eth0
Definition: lwip.c:72
netif_set_default
void netif_set_default(struct netif *netif)
Definition: netif.c:604
netif_link_callback
void netif_link_callback(struct netif *eth)
Definition: lwip.c:79
netif_add
struct netif * netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
Definition: netif.c:241