Advertisement
Guest User

Untitled

a guest
Nov 5th, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.81 KB | None | 0 0
  1.  
  2. /**
  3.   ******************************************************************************
  4.   * File Name          : lwipopts.h
  5.   * Description        : This file overrides LwIP stack default configuration
  6.   *                      done in opt.h file.
  7.   ******************************************************************************
  8.   * This notice applies to any and all portions of this file
  9.   * that are not between comment pairs USER CODE BEGIN and
  10.   * USER CODE END. Other portions of this file, whether
  11.   * inserted by the user or by software development tools
  12.   * are owned by their respective copyright owners.
  13.   *
  14.   * Copyright (c) 2017 STMicroelectronics International N.V.
  15.   * All rights reserved.
  16.   *
  17.   * Redistribution and use in source and binary forms, with or without
  18.   * modification, are permitted, provided that the following conditions are met:
  19.   *
  20.   * 1. Redistribution of source code must retain the above copyright notice,
  21.   *    this list of conditions and the following disclaimer.
  22.   * 2. Redistributions in binary form must reproduce the above copyright notice,
  23.   *    this list of conditions and the following disclaimer in the documentation
  24.   *    and/or other materials provided with the distribution.
  25.   * 3. Neither the name of STMicroelectronics nor the names of other
  26.   *    contributors to this software may be used to endorse or promote products
  27.   *    derived from this software without specific written permission.
  28.   * 4. This software, including modifications and/or derivative works of this
  29.   *    software, must execute solely and exclusively on microcontroller or
  30.   *    microprocessor devices manufactured by or for STMicroelectronics.
  31.   * 5. Redistribution and use of this software other than as permitted under
  32.   *    this license is void and will automatically terminate your rights under
  33.   *    this license.
  34.   *
  35.   * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  36.   * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  37.   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  38.   * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  39.   * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  40.   * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  41.   * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  42.   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  43.   * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  44.   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  45.   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  46.   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47.   *
  48.   ******************************************************************************
  49.   */
  50.  
  51. /* Define to prevent recursive inclusion --------------------------------------*/
  52. #ifndef __LWIPOPTS__H__
  53. #define __LWIPOPTS__H__
  54.  
  55. #include "stm32f4xx_hal.h"
  56.  
  57. /*-----------------------------------------------------------------------------*/
  58. /* Current version of LwIP supported by CubeMx: 2.0.0 -*/
  59. /*-----------------------------------------------------------------------------*/
  60.  
  61. /* Within 'USER CODE' section, code will be kept by default at each generation */
  62. /* USER CODE BEGIN 0 */
  63.  
  64. /* USER CODE END 0 */
  65.  
  66. #ifdef __cplusplus
  67.  extern "C" {
  68. #endif
  69.  
  70. /* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/
  71. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  72. /*----- WITH_RTOS enabled (Since FREERTOS is set) -----*/
  73. #define WITH_RTOS 1
  74. /*----- CHECKSUM_BY_HARDWARE disabled -----*/
  75. #define CHECKSUM_BY_HARDWARE 0
  76. /*-----------------------------------------------------------------------------*/
  77.  
  78. /* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
  79. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  80. /*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/
  81. #define MEM_ALIGNMENT 4
  82. /*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/
  83. #define LWIP_ETHERNET 0
  84. /*----- 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) -*/
  85. #define LWIP_DNS_SECURE 7
  86. /*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/
  87. #define TCP_SND_QUEUELEN 9
  88. /*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/
  89. #define TCP_SNDLOWAT 1071
  90. /*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/
  91. #define TCP_SNDQUEUELOWAT 5
  92. /*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/
  93. #define TCP_WND_UPDATE_THRESHOLD 536
  94. /*----- Value in opt.h for TCPIP_THREAD_STACKSIZE: 0 -----*/
  95. #define TCPIP_THREAD_STACKSIZE 1024
  96. /*----- Value in opt.h for TCPIP_THREAD_PRIO: 1 -----*/
  97. #define TCPIP_THREAD_PRIO 3
  98. /*----- Value in opt.h for TCPIP_MBOX_SIZE: 0 -----*/
  99. #define TCPIP_MBOX_SIZE 6
  100. /*----- Value in opt.h for SLIPIF_THREAD_STACKSIZE: 0 -----*/
  101. #define SLIPIF_THREAD_STACKSIZE 1024
  102. /*----- Value in opt.h for SLIPIF_THREAD_PRIO: 1 -----*/
  103. #define SLIPIF_THREAD_PRIO 3
  104. /*----- Value in opt.h for DEFAULT_THREAD_STACKSIZE: 0 -----*/
  105. #define DEFAULT_THREAD_STACKSIZE 1024
  106. /*----- Value in opt.h for DEFAULT_THREAD_PRIO: 1 -----*/
  107. #define DEFAULT_THREAD_PRIO 3
  108. /*----- Value in opt.h for DEFAULT_UDP_RECVMBOX_SIZE: 0 -----*/
  109. #define DEFAULT_UDP_RECVMBOX_SIZE 6
  110. /*----- Value in opt.h for DEFAULT_TCP_RECVMBOX_SIZE: 0 -----*/
  111. #define DEFAULT_TCP_RECVMBOX_SIZE 6
  112. /*----- Value in opt.h for DEFAULT_ACCEPTMBOX_SIZE: 0 -----*/
  113. #define DEFAULT_ACCEPTMBOX_SIZE 6
  114. /*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/
  115. #define RECV_BUFSIZE_DEFAULT 2000000000
  116. /*----- Default Value for PPP_SUPPORT: 0 ---*/
  117. #define PPP_SUPPORT 1
  118. /*----- Default Value for PRINTPKT_SUPPORT: 0 ---*/
  119. #define PRINTPKT_SUPPORT 1
  120. /*----- Default Value for PAP_SUPPORT: 0 ---*/
  121. #define PAP_SUPPORT 1
  122. /*----- Default Value for VJ_SUPPORT: 1 ---*/
  123. #define VJ_SUPPORT 0
  124. /*----- Value in opt.h for LWIP_STATS: 1 -----*/
  125. #define LWIP_STATS 0
  126. /*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/
  127. #define CHECKSUM_GEN_IP 0
  128. /*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/
  129. #define CHECKSUM_GEN_UDP 0
  130. /*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/
  131. #define CHECKSUM_GEN_TCP 0
  132. /*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/
  133. #define CHECKSUM_GEN_ICMP 0
  134. /*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/
  135. #define CHECKSUM_GEN_ICMP6 0
  136. /*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/
  137. #define CHECKSUM_CHECK_IP 0
  138. /*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/
  139. #define CHECKSUM_CHECK_UDP 0
  140. /*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/
  141. #define CHECKSUM_CHECK_TCP 0
  142. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/
  143. #define CHECKSUM_CHECK_ICMP 0
  144. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/
  145. #define CHECKSUM_CHECK_ICMP6 0
  146. /*----- Default Value for NETIF_DEBUG: LWIP_DBG_OFF ---*/
  147. #define NETIF_DEBUG LWIP_DBG_ON
  148. /*----- Default Value for SOCKETS_DEBUG: LWIP_DBG_OFF ---*/
  149. #define SOCKETS_DEBUG LWIP_DBG_ON
  150. /*----- Default Value for TCP_DEBUG: LWIP_DBG_OFF ---*/
  151. #define TCP_DEBUG LWIP_DBG_ON
  152. /*----- Default Value for PPP_DEBUG: LWIP_DBG_OFF ---*/
  153. #define PPP_DEBUG LWIP_DBG_ON
  154. /*-----------------------------------------------------------------------------*/
  155. /* USER CODE BEGIN 1 */
  156. #define LWIP_RAW                        1
  157. #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
  158. #define LWIP_DEBUG 1
  159. #define PPP_PROTOCOLNAME 1
  160. #define LWIP_TCP                        1
  161. /* USER CODE END 1 */
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166. #endif /*__LWIPOPTS__H_H */
  167.  
  168. /************************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement