lwipopts.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /**
  2. ******************************************************************************
  3. * File Name : lwipopts.h
  4. * Description : This file overrides LwIP stack default configuration
  5. * done in opt.h file.
  6. ******************************************************************************
  7. * This notice applies to any and all portions of this file
  8. * that are not between comment pairs USER CODE BEGIN and
  9. * USER CODE END. Other portions of this file, whether
  10. * inserted by the user or by software development tools
  11. * are owned by their respective copyright owners.
  12. *
  13. * Copyright (c) 2018 STMicroelectronics International N.V.
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted, provided that the following conditions are met:
  18. *
  19. * 1. Redistribution of source code must retain the above copyright notice,
  20. * this list of conditions and the following disclaimer.
  21. * 2. Redistributions in binary form must reproduce the above copyright notice,
  22. * this list of conditions and the following disclaimer in the documentation
  23. * and/or other materials provided with the distribution.
  24. * 3. Neither the name of STMicroelectronics nor the names of other
  25. * contributors to this software may be used to endorse or promote products
  26. * derived from this software without specific written permission.
  27. * 4. This software, including modifications and/or derivative works of this
  28. * software, must execute solely and exclusively on microcontroller or
  29. * microprocessor devices manufactured by or for STMicroelectronics.
  30. * 5. Redistribution and use of this software other than as permitted under
  31. * this license is void and will automatically terminate your rights under
  32. * this license.
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  35. * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  37. * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  38. * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  39. * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  40. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  42. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  43. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  44. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  45. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. *
  47. ******************************************************************************
  48. */
  49. /* Define to prevent recursive inclusion --------------------------------------*/
  50. #ifndef __LWIPOPTS__H__
  51. #define __LWIPOPTS__H__
  52. #include "stm32f4xx_hal.h"
  53. /*-----------------------------------------------------------------------------*/
  54. /* Current version of LwIP supported by CubeMx: 2.0.3 -*/
  55. /*-----------------------------------------------------------------------------*/
  56. /* Within 'USER CODE' section, code will be kept by default at each generation */
  57. /* USER CODE BEGIN 0 */
  58. /* USER CODE END 0 */
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif
  62. /* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/
  63. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  64. /*----- WITH_RTOS disabled (Since FREERTOS is not set) -----*/
  65. #define WITH_RTOS 0
  66. /*----- CHECKSUM_BY_HARDWARE disabled -----*/
  67. #define CHECKSUM_BY_HARDWARE 0
  68. /*-----------------------------------------------------------------------------*/
  69. /* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
  70. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  71. /*----- Value in opt.h for NO_SYS: 0 -----*/
  72. #define NO_SYS 1
  73. /*----- Value in opt.h for SYS_LIGHTWEIGHT_PROT: 1 -----*/
  74. #define SYS_LIGHTWEIGHT_PROT 0
  75. /*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/
  76. #define MEM_ALIGNMENT 4
  77. /*----- Default Value for MEM_SIZE: 1600 ---*/
  78. #define MEM_SIZE 16000
  79. /*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/
  80. #define LWIP_ETHERNET 1
  81. /*----- Value in opt.h for LWIP_DNS_SECURE: (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -*/
  82. #define LWIP_DNS_SECURE 7
  83. /*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/
  84. #define TCP_SND_QUEUELEN 9
  85. /*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/
  86. #define TCP_SNDLOWAT 1071
  87. /*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/
  88. #define TCP_SNDQUEUELOWAT 5
  89. /*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/
  90. #define TCP_WND_UPDATE_THRESHOLD 536
  91. /*----- Value in opt.h for LWIP_NETCONN: 1 -----*/
  92. #define LWIP_NETCONN 0
  93. /*----- Value in opt.h for LWIP_SOCKET: 1 -----*/
  94. #define LWIP_SOCKET 0
  95. /*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/
  96. #define RECV_BUFSIZE_DEFAULT 2000000000
  97. /*----- Value in opt.h for LWIP_STATS: 1 -----*/
  98. #define LWIP_STATS 0
  99. /*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/
  100. #define CHECKSUM_GEN_IP 0
  101. /*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/
  102. #define CHECKSUM_GEN_UDP 0
  103. /*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/
  104. #define CHECKSUM_GEN_TCP 0
  105. /*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/
  106. #define CHECKSUM_GEN_ICMP 0
  107. /*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/
  108. #define CHECKSUM_GEN_ICMP6 0
  109. /*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/
  110. #define CHECKSUM_CHECK_IP 0
  111. /*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/
  112. #define CHECKSUM_CHECK_UDP 0
  113. /*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/
  114. #define CHECKSUM_CHECK_TCP 0
  115. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/
  116. #define CHECKSUM_CHECK_ICMP 0
  117. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/
  118. #define CHECKSUM_CHECK_ICMP6 0
  119. /*-----------------------------------------------------------------------------*/
  120. /* USER CODE BEGIN 1 */
  121. /* USER CODE END 1 */
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125. #endif /*__LWIPOPTS__H__ */
  126. /************************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/