Created
September 28, 2014 14:36
-
-
Save zarya/086dade06d8899fb3754 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_exeCmdGPIO(uint8_t id, char *pPara) | |
{ | |
uint8_t on; | |
// uart0_sendStr("GPIO\r\n"); | |
pPara++; | |
on = atoi(pPara); | |
if(on == 0) | |
{ | |
gpio_output_set(0, BIT2, BIT2, 0); | |
// uart0_sendStr("GPIO CLR\r\n"); | |
} | |
else if(on == 1) | |
{ | |
gpio_output_set(BIT2, 0, BIT2, 0); | |
// uart0_sendStr("GPIO SET\r\n"); | |
} | |
else if(on == 2) | |
{ | |
os_timer_arm(&blinky, 200, 1); | |
// uart0_sendStr("GPIO SET\r\n"); | |
} | |
else if(on == 3) | |
{ | |
os_timer_disarm(&blinky); | |
// uart0_sendStr("GPIO SET\r\n"); | |
} | |
else | |
{ | |
// uart0_sendStr("GPIO ERROR\r\n"); | |
at_backError; | |
return; | |
} | |
at_backOk; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment