Created
September 28, 2014 16:04
-
-
Save zarya/637ca0a1853e68523b86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ICACHE_FLASH_ATTR | |
at_tcpclient_recv(void *arg, char *pdata, unsigned short len) | |
{ | |
struct espconn *pespconn = (struct espconn *)arg; | |
at_linkConType *linkTemp = (at_linkConType *)pespconn->reverse; | |
char temp[32]; | |
if(at_ipMux) | |
{ | |
os_sprintf(temp, "\r\n+IPD,%d,%d:", | |
linkTemp->linkId, len); | |
uart0_sendStr(temp); | |
uart0_tx_buffer(pdata, len); | |
if (pdata[0] == 'L' && pdata[1] == 'E' && pdata[2] == 'D') { | |
if (pdata[3] == '1') { | |
uart0_sendStr("\r\nSet led ON\r\n"); | |
gpio_output_set(BIT2, 0, BIT2, 0); | |
//gpio_output_set(GPIO_ID_PIN(2), 1); | |
} else { | |
uart0_sendStr("\r\nSet led OFF\r\n"); | |
gpio_output_set(0, BIT2, BIT2, 0); | |
//gpio_output_set(GPIO_ID_PIN(2), 0); | |
} | |
} | |
} | |
else if(IPMODE == FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment