14 changed files with 270 additions and 218 deletions
@ -1,78 +0,0 @@ |
|||||
////////////////////////////////////////////////////////////////////////////
|
|
||||
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
|
||||
///-------------------------------------------------------------------------
|
|
||||
/// @file bsp_drv.c
|
|
||||
/// @brief bsp @ driver config
|
|
||||
///-------------------------------------------------------------------------
|
|
||||
/// @version 1.0
|
|
||||
/// @author CC
|
|
||||
/// @date 20180331
|
|
||||
/// @note cc_AS_stc02
|
|
||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||
|
|
||||
#include "../app/task_smartconfig.h" |
|
||||
#include "../app/app_config.h" |
|
||||
#include "../app/task_w600.h" |
|
||||
#include "../msp/uartx.h" |
|
||||
#include "../msp/uart0.h" |
|
||||
#include "../msp/uart2.h" |
|
||||
#include "../clib/clib.h" |
|
||||
|
|
||||
|
|
||||
S_TASK_SMART_CONFIG task_smartconfig; |
|
||||
|
|
||||
|
|
||||
void L3_task_SmartConfig_init(void) |
|
||||
{ |
|
||||
L1_task_init(&task_smartconfig.task); |
|
||||
task_smartconfig.status = 0; |
|
||||
L3_task_s_go(task_smartconfig,D_task_init); |
|
||||
} |
|
||||
|
|
||||
#define D_task_SAMRTCONFIG 0x50 |
|
||||
#define D_task_SMARTCSUCCESS 0x52 |
|
||||
#define D_task_SAMRTCSTOP 0x53 |
|
||||
#define D_task_SAMRTCSTOPPED 0x54 |
|
||||
|
|
||||
|
|
||||
void L3_task_SmartConfig_handler(S_TASK_SMART_CONFIG *s) |
|
||||
{ |
|
||||
// TTSS_Task_init()
|
|
||||
// L2_task_go(D_task_SAMRTCONFIG);
|
|
||||
// // L0_uart0_uc('*');
|
|
||||
// // L0_uart0_uchex(task_smartconfig.status);
|
|
||||
// // L0_uart0_uchex(s->status);
|
|
||||
// // L0_uart0_0d0a();
|
|
||||
// // L0_uart0_ulhex((U32)s);
|
|
||||
|
|
||||
// TTSS_Task_step(D_task_SAMRTCONFIG)
|
|
||||
// L3_gm35_send_str(AT_INS_ST_STARTSMART); //开启SmartC
|
|
||||
// L2_task_go_Tdelay(D_task_SAMRTCONFIG,D_Tdelay_500ms);
|
|
||||
// TTSS_Task_step(D_task_SAMRTCONFIG)
|
|
||||
// if(Lc_strStartsWith(ts_uart[uNum2].r.buf,"\r\nOK"))
|
|
||||
// {
|
|
||||
// L0_uart0_sendstr("SmartConfig Enter-->");
|
|
||||
// // 语音输出:进入配网模式,请配合手机
|
|
||||
// L2_task_go_Tdelay(D_task_SMARTCSUCCESS,D_Tdelay_300ms);
|
|
||||
// }
|
|
||||
// TTSS_Task_step(D_task_SMARTCSUCCESS)
|
|
||||
// if(Lc_strStartsWith(ts_uart[uNum2].r.buf,"\r\nsmartconfig type"))
|
|
||||
// {
|
|
||||
// L0_uart0_sendstr("SmartConfig Success!");
|
|
||||
// // 语音输出:配网模式成功,请重启设备
|
|
||||
// L2_task_go_Tdelay(D_task_SAMRTCSTOP,D_Tdelay_300ms);
|
|
||||
// }
|
|
||||
// TTSS_Task_step(D_task_SAMRTCSTOP)
|
|
||||
// L3_gm35_send_str(AT_INS_ST_STOPSMART);
|
|
||||
// L2_task_go_Tdelay(D_task_SAMRTCSTOPPED,D_Tdelay_300ms);
|
|
||||
|
|
||||
// TTSS_Task_step(D_task_SAMRTCSTOPPED)
|
|
||||
// if (Lc_strStartsWith(ts_uart[uNum2].r.buf,"\r\nOK"))
|
|
||||
// {
|
|
||||
// L0_uart0_sendstr("SmartConfig Stop!");
|
|
||||
// R.app_status = WIFI_CONNECTED;
|
|
||||
// L2_task_go_Tdelay(D_task_DETECTCHANGE,D_Tdelay_300ms);
|
|
||||
// }
|
|
||||
|
|
||||
// TTSS_Task_end();
|
|
||||
} |
|
@ -1,34 +0,0 @@ |
|||||
////////////////////////////////////////////////////////////////////////////
|
|
||||
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
|
||||
///-------------------------------------------------------------------------
|
|
||||
/// @file bsp_drv.h
|
|
||||
/// @brief bsp @ driver config
|
|
||||
///-------------------------------------------------------------------------
|
|
||||
/// @version 1.0
|
|
||||
/// @author CC
|
|
||||
/// @date 20180331
|
|
||||
/// @note cc_AS_stc02
|
|
||||
|
|
||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||
|
|
||||
#ifndef _TASK_SMARTC_H |
|
||||
#define _TASK_SMARTC_H |
|
||||
|
|
||||
#include "../ctask/task.h" |
|
||||
#include "../app/app_config.h" |
|
||||
#include "../clib/type.h" |
|
||||
|
|
||||
|
|
||||
|
|
||||
typedef struct _s_task_smartc |
|
||||
{ |
|
||||
TS_task task; |
|
||||
APP_STATUS status; |
|
||||
}S_TASK_SMART_CONFIG; |
|
||||
|
|
||||
extern S_TASK_SMART_CONFIG task_smartconfig; |
|
||||
|
|
||||
extern void L3_task_SmartConfig_init(void); |
|
||||
extern void L3_task_SmartConfig_handler(S_TASK_SMART_CONFIG *s); |
|
||||
|
|
||||
#endif // #ifndef
|
|
Loading…
Reference in new issue