1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
47
52
72
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* ... */
#ifndef __APP_NETXDUO_H__
#define __APP_NETXDUO_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "nx_api.h"
#include "nx_stm32_eth_driver.h"
#include <stdio.h>
#include "main.h"
#include "nxd_dhcp_client.h"
#include "stm32f4xx_nucleo_144.h"
6 includes
Exported types
Exported constants
#define PRINT_IP_ADDRESS(addr) do { \
printf("STM 32 %s: %lu.%lu.%lu.%lu \n", #addr, \
(addr >> 24) & 0xff, \
(addr >> 16) & 0xff, \
(addr >> 8) & 0xff, \
addr& 0xff);\
...}while(0)...
#define PRINT_DATA(addr, port, data) do { \
printf("[%lu.%lu.%lu.%lu:%u] -> '%s' \n", \
(addr >> 24) & 0xff, \
(addr >> 16) & 0xff, \
(addr >> 8) & 0xff, \
(addr & 0xff), port, data); \
...} while(0)...
Exported macro
UINT MX_NetXDuo_Init(VOID *memory_ptr);
Exported functions prototypes
#define PAYLOAD_SIZE 1536
#define NX_PACKET_POOL_SIZE (( PAYLOAD_SIZE + sizeof(NX_PACKET)) * 10)
#define DEFAULT_MEMORY_SIZE 1024
#define DEFAULT_PRIORITY 10
#define WINDOW_SIZE 512
#define LINK_PRIORITY 11
#define NULL_ADDRESS 0
#define DEFAULT_PORT 6000
#define MAX_TCP_CLIENTS 1
9 defines
#ifdef __cplusplus
}extern "C" { ... }
#endif/* ... */
#endif