add Scan WiFi

This commit is contained in:
pvvx 2017-03-30 05:05:27 +03:00
parent 8482fb4fda
commit d7bf8681b3
11 changed files with 2469 additions and 2284 deletions

View file

@ -294,6 +294,27 @@ void fATDS(int argc, char *argv[]) // Deep sleep
deepsleep_ex(DSLEEP_WAKEUP_BY_TIMER, sleep_ms);
#endif
}
/*------------------------------------------------------------------------------
* power saving mode
*----------------------------------------------------------------------------*/
void fATSP(int argc, char *argv[])
{
if(argc > 2) {
switch (argv[1][0]) {
case 'a': // acquire
{
acquire_wakelock(atoi(argv[2]));
break;
}
case 'r': // release
{
release_wakelock(atoi(argv[2]));
break;
}
}
}
printf("WakeLock Status %d\n", get_wakelock_status());
}
MON_RAM_TAB_SECTION COMMAND_TABLE console_commands1[] = {
{"ATST", 0, fATST, ": Memory info"},
@ -302,6 +323,7 @@ MON_RAM_TAB_SECTION COMMAND_TABLE console_commands1[] = {
{"ATSD", 1, fATSD, "=<ADDRES(hex)>[,COUNT(dec)]: Dump dword register"},
{"ATSW", 2, fATSW, "=<ADDRES(hex)>,<DATA(hex)>: Set register"},
{"ATDS", 0, fATDS, "=[TIME(ms)]: Deep sleep"},
{"ATSP", 0, fATSP, "=<a,r>,<wakelock_status:1|2|4|8>: Power"}
};
#endif //#ifdef CONFIG_AT_USR