Search found 2 matches
- Fri Feb 09, 2018 5:58 am
- Forum: General Discussion
- Topic: tcp_output don't work
- Replies: 0
- Views: 2035
tcp_output don't work
int i = 0; err_t ret; uint8_t *sendbuf = malloc(1024); memset(sendbuf, 'a', 1024); for (i=1;i<10;i++){ ret = tcp_write(pcb_data, sendbuf, 1024, 1); ESP_LOGI(TAG,"tcp_write=%d",ret); ret = tcp_output(pcb_data); ESP_LOGI(TAG,"tcp_output=%d",ret); } [0;32mI (41430) ftp_server: tcp_write=0[0m [0;32mI (...
- Sun Oct 22, 2017 8:26 am
- Forum: General Discussion
- Topic: Can use the getchar() of stdin so debug online is possible
- Replies: 0
- Views: 2663
Can use the getchar() of stdin so debug online is possible
int x = 0; char a[10]; char *pa; memset(a,0,sizeof(a)); pa = a; while (1) { x = getchar(); //Get chars that send from UART tool if (x>0) { // printf("x=%d\n",x); if (x == 10) //Command line end with LF { printf("you send=%s\n",a); //Do something memset(a,0,sizeof(a)); pa = a; }else{ *pa = x; pa++; ...