pile_com_stm32/main_old/communication_pad/inc/tcp_server.h

23 lines
448 B
C
Raw Permalink Normal View History

2024-03-27 16:13:03 +08:00
#ifndef __TCP_SERVER_H
#define __TCP_SERVER_H
#include <stdint.h>
#define TCP_SERVER_PORT 6000
// 链表,记录连接的客户端
struct clientNode
{
struct tcp_pcb *pcb;
int enable_notify; // 是否使能数据上报
struct clientNode *next;
};
void tcp_server_init(void);
void ble_write_data(int id, uint8_t *data, int len);
void ble_read_data(uint8_t *data, int len);
void tcp_server_notify(uint8_t *data, int len);
#endif