blob: 8218d485d09fbbadcaa8c5320308e56e3adab34b [file] [log] [blame]
#ifndef CONFIG_MIN_8M_VERSION
#include "ext_regist.h"
#include "at_utils.h"
#include "softap_api.h"
static int ext_kwatcholw_fun(int at_fd, char *at_paras, void ** res_msg, int *res_msglen)
{
char *at_str = malloc(32);
assert(at_str);
memset(at_str, 0x00, 32);
system("/bin/kwatch_ctrl -m 1 &");
sprintf(at_str, "\r\nOK\r\n");
*res_msg = at_str;
*res_msglen = strlen(at_str);
return AT_END;
}
static int ext_kwatchftw_fun(int at_fd, char *at_paras, void ** res_msg, int *res_msglen)
{
char *at_str = malloc(32);
assert(at_str);
memset(at_str, 0x00, 32);
system("/bin/kwatch_ctrl -m 2 &");
sprintf(at_str, "\r\nOK\r\n");
*res_msg = at_str;
*res_msglen = strlen(at_str);
return AT_END;
}
int ext_kwatchtest_regist(void)
{
register_serv_func2("kwatchtest-owl", MODULE_ID_KWATCH_CTRL, 0, 0, ext_kwatcholw_fun, NULL);
register_serv_func2("kwatchtest-ftw", MODULE_ID_KWATCH_CTRL, 0, 0, ext_kwatchftw_fun, NULL);
return 0;
}
#endif