Statistics: Posted by ESP_Sprite — Fri Feb 13, 2015 5:34 pm
Code:
// this is the function that uses received data
static void ICACHE_FLASH_ATTR ctrl_platform_recv_cb(void *arg, char *pdata, unsigned short len)
{
struct espconn *pespconn = arg;
espconn_recv_hold(pespconn); // HOLD RECEIVING TCP DATA
// Here I do stuff with data I received...
// The WDT RESET happens when chip receives more data before exiting this function :(
espconn_recv_unhold(pespconn); // RESUME RECEIVING TCP DATA
}
Statistics: Posted by muris — Fri Feb 13, 2015 4:52 pm
Code:
// somewhere I declare callback for receiving TCP data...
espconn_regist_recvcb(pespconn, ctrl_platform_recv_cb);
Code:
// this is the function that uses received data
static void ICACHE_FLASH_ATTR ctrl_platform_recv_cb(void *arg, char *pdata, unsigned short len)
{
struct espconn *pespconn = arg;
// Here I do stuff with data I received...
// The WDT RESET happens when chip receives more data before exiting this function :(
}
Statistics: Posted by muris — Fri Feb 13, 2015 3:51 am