|
@@ -16,6 +16,10 @@
|
|
|
|
|
|
|
|
#define MAX_SIZE 4096
|
|
#define MAX_SIZE 4096
|
|
|
|
|
|
|
|
|
|
+#define SEND_SIZE 5*1024
|
|
|
|
|
+
|
|
|
|
|
+static unsigned char send_data[SEND_SIZE];
|
|
|
|
|
+
|
|
|
|
|
|
|
|
static err_t tcp_accept_handle(void *arg, struct tcp_pcb *pcb, err_t err);
|
|
static err_t tcp_accept_handle(void *arg, struct tcp_pcb *pcb, err_t err);
|
|
|
static err_t tcp_recv_handle(void *arg, struct tcp_pcb *pcb, struct pbuf *p,
|
|
static err_t tcp_recv_handle(void *arg, struct tcp_pcb *pcb, struct pbuf *p,
|
|
@@ -232,10 +236,11 @@ void lwip_udp_sendto(struct udp_pcb *pcb, unsigned int ip, int port,
|
|
|
/**
|
|
/**
|
|
|
* udp Ïògui·¢ËÍÊý¾Ý
|
|
* udp Ïògui·¢ËÍÊý¾Ý
|
|
|
*/
|
|
*/
|
|
|
|
|
+
|
|
|
void lwip_udp_send_gui(unsigned char *data, int len)
|
|
void lwip_udp_send_gui(unsigned char *data, int len)
|
|
|
{
|
|
{
|
|
|
struct pbuf *pbuf = pbuf_alloc(PBUF_TRANSPORT, len,
|
|
struct pbuf *pbuf = pbuf_alloc(PBUF_TRANSPORT, len,
|
|
|
- PBUF_REF);
|
|
|
|
|
|
|
+ PBUF_REF);
|
|
|
pbuf->payload = data;
|
|
pbuf->payload = data;
|
|
|
udp_send(gui_udp_pcb, pbuf);
|
|
udp_send(gui_udp_pcb, pbuf);
|
|
|
pbuf_free(pbuf);
|
|
pbuf_free(pbuf);
|
|
@@ -320,6 +325,7 @@ void lwip_udp_send_vofa(float *data, int len)
|
|
|
*/
|
|
*/
|
|
|
void lwip_udp_send_vofa2(float *data1, float *data2, int len)
|
|
void lwip_udp_send_vofa2(float *data1, float *data2, int len)
|
|
|
{
|
|
{
|
|
|
|
|
+ ConsolePuts("lwip send data", -1);
|
|
|
int i = 0;
|
|
int i = 0;
|
|
|
char tail[4] = {0x00, 0x00, 0x80, 0x7f};
|
|
char tail[4] = {0x00, 0x00, 0x80, 0x7f};
|
|
|
int flen = (sizeof(float)*2+4)*len;
|
|
int flen = (sizeof(float)*2+4)*len;
|