提交 | 用户 | age
|
8b51c7
|
1 |
#ifndef _LOOPBACK_H_ |
Q |
2 |
#define _LOOPBACK_H_ |
|
3 |
|
|
4 |
#ifdef __cplusplus |
|
5 |
extern "C" { |
|
6 |
#endif |
|
7 |
|
|
8 |
#include <stdint.h> |
|
9 |
|
|
10 |
/* Loopback test debug message printout enable */ |
|
11 |
// #define _LOOPBACK_DEBUG_ |
|
12 |
|
|
13 |
/* DATA_BUF_SIZE define for Loopback example */ |
|
14 |
#ifndef DATA_BUF_SIZE |
|
15 |
#define DATA_BUF_SIZE 256 |
|
16 |
#endif |
|
17 |
|
|
18 |
/************************/ |
|
19 |
/* Select LOOPBACK_MODE */ |
|
20 |
/************************/ |
|
21 |
#define LOOPBACK_MAIN_NOBLOCK 0 |
|
22 |
#define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK |
|
23 |
|
|
24 |
|
|
25 |
/* TCP server Loopback test example */ |
|
26 |
int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); |
|
27 |
|
|
28 |
/* TCP client Loopback test example */ |
|
29 |
int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); |
|
30 |
|
|
31 |
/* UDP Loopback test example */ |
|
32 |
int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); |
|
33 |
|
|
34 |
#ifdef __cplusplus |
|
35 |
} |
|
36 |
#endif |
|
37 |
|
|
38 |
#endif |