| 1 |
#ifndef MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H |
| 2 |
#define MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H |
| 3 |
|
| 4 |
#define LWIP_NETIF_EXT_STATUS_CALLBACK 1 |
| 5 |
|
| 6 |
#define LWIP_LOOPIF_MULTICAST 1 |
| 7 |
#define LWIP_LOOPBACK_MAX_PBUFS 8 |
| 8 |
|
| 9 |
#define LWIP_IPV6 0 |
| 10 |
|
| 11 |
#define LWIP_RAND() rng_get() |
| 12 |
|
| 13 |
// Increase memory for lwIP to get better performance. |
| 14 |
#if defined(STM32N6) |
| 15 |
#define MEM_SIZE (16 * 1024) |
| 16 |
#define TCP_MSS (1460) |
| 17 |
#define TCP_WND (8 * TCP_MSS) |
| 18 |
#define TCP_SND_BUF (8 * TCP_MSS) |
| 19 |
#define MEMP_NUM_TCP_SEG (32) |
| 20 |
#endif |
| 21 |
|
| 22 |
// Include common lwIP configuration. |
| 23 |
#include "extmod/lwip-include/lwipopts_common.h" |
| 24 |
|
| 25 |
extern uint32_t rng_get(void); |
| 26 |
|
| 27 |
#endif // MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H |