/** ****************************************************************************** * File Name : LWIP.h * Description : This file provides code for the configuration * of the LWIP. ****************************************************************************** * @attention * *

© Copyright (c) 2021 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "License"; You may not use this file except in compliance with * the License. You may obtain a copy of the License at: * www.st.com/SLA0044 * ************************************************************************* */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __mx_lwip_H #define __mx_lwip_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #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" /* Includes for RTOS ---------------------------------------------------------*/ #if WITH_RTOS #include "lwip/tcpip.h" #endif /* WITH_RTOS */ #define MAX_IP 4 /* USER CODE BEGIN 0 */ typedef struct { char ipv4_addr[16]; char ipv4_nm[16]; char ipv4_gw[16]; struct netif netif; }network_settings; /* массив IP, multiIP*/ void LWIP_SetIP(network_settings *net, char *NewIP); void LWIP_SetNetMask(network_settings *net, char *NewNetMask); void LWIP_Set_Gateway(network_settings *net, char *NewGateway); void LWIP_SetNetSettings(network_settings *net, char *NewIP, char *NewNetMask, char *NewGateway); void LWIP_NetApply(network_settings *net); void LWIP_resetIP(network_settings *net); /* USER CODE END 0 */ /* Global Variables ----------------------------------------------------------*/ extern ETH_HandleTypeDef heth; /* LWIP init function */ void MX_LWIP_Init(network_settings *net); #if !WITH_RTOS /* USER CODE BEGIN 1 */ /* Function defined in lwip.c to: * - Read a received packet from the Ethernet buffers * - Send it to the lwIP stack for handling * - Handle timeouts if NO_SYS_NO_TIMERS not set */ void MX_LWIP_Process(void); /* USER CODE END 1 */ #endif /* WITH_RTOS */ #ifdef __cplusplus } #endif #endif /*__ mx_lwip_H */ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/