2026-05-21 10:01:28 +08:00
|
|
|
|
2026-05-21 12:19:01 +08:00
|
|
|
/**
|
|
|
|
|
******************************************************************************
|
|
|
|
|
* @file User\App\task_udp.h
|
|
|
|
|
* @author 路淮
|
|
|
|
|
* @version v0.1
|
|
|
|
|
* @date 2026-05-21
|
|
|
|
|
* @brief UDP通信任务头文件
|
|
|
|
|
******************************************************************************
|
|
|
|
|
*/
|
|
|
|
|
|
2026-05-21 10:01:28 +08:00
|
|
|
#ifndef __UDP_TASK_H
|
|
|
|
|
#define __UDP_TASK_H
|
|
|
|
|
|
2026-05-21 12:19:01 +08:00
|
|
|
/* includes ------------------------------------------------------------------*/
|
2026-05-21 10:01:28 +08:00
|
|
|
#include "global.h"
|
|
|
|
|
#include "board_config.h"
|
|
|
|
|
#include "udp_router.h"
|
|
|
|
|
#include "udp_manager.h"
|
|
|
|
|
#include "lwip/opt.h"
|
|
|
|
|
#include "lwip/api.h"
|
|
|
|
|
#include "lwip/sys.h"
|
|
|
|
|
#include "httpd.h"
|
|
|
|
|
|
|
|
|
|
// 定义UDP消息体
|
|
|
|
|
typedef struct {
|
|
|
|
|
ip4_addr_t src_ip; // 来源IP
|
|
|
|
|
uint16_t src_port; // 来源端口
|
|
|
|
|
uint16_t len; // 数据长度
|
|
|
|
|
char *data; // 数据指针(动态分配)
|
|
|
|
|
} UdpMsg_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __UDP_TASK_H */
|