8 changed files with 151 additions and 50 deletions
@ -0,0 +1,46 @@ |
|||
////////////////////////////////////////////////////////////////////////////
|
|||
///@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 "task_low_power.h" |
|||
#include "../app/app_config.h" |
|||
#include "../bsp/bsp_config.h" |
|||
#include "../msp/uart0.h" |
|||
|
|||
S_TASK_LOW_POWER _s_task_low_power; |
|||
|
|||
void L3_task_low_power_init(void) |
|||
{ |
|||
L1_task_init(&_s_task_low_power.task); |
|||
L3_task_s_go(_s_task_low_power,D_task_init); |
|||
} |
|||
|
|||
#define D_task_LOW_POWER_SET 0x50 |
|||
|
|||
void L3_task_low_power_handler(S_TASK_LOW_POWER *s) |
|||
{ |
|||
TTSS_Task_init() |
|||
L2_task_go(D_task_LOW_POWER_SET); |
|||
|
|||
TTSS_Task_step(D_task_LOW_POWER_SET) |
|||
if(R.power_mode == POWER_LOW) |
|||
{ |
|||
//除了功能按键,所有灯全灭
|
|||
L3_led_clear(); |
|||
} |
|||
L2_task_go_Tdelay(D_task_LOW_POWER_SET,D_Tdelay_1s); |
|||
|
|||
TTSS_Task_end(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,32 @@ |
|||
////////////////////////////////////////////////////////////////////////////
|
|||
///@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 _APP_TASK_LOW_POWER_H |
|||
#define _APP_TASK_LOW_POWER_H |
|||
|
|||
#include "../ctask/task.h" |
|||
#include "../clib/clib.h" |
|||
|
|||
typedef struct _s_task_low_power |
|||
{ |
|||
TS_task task; |
|||
}S_TASK_LOW_POWER; |
|||
|
|||
extern S_TASK_LOW_POWER _s_task_low_power; |
|||
|
|||
extern void L3_task_low_power_init(void); |
|||
extern void L3_task_low_power_handler(S_TASK_LOW_POWER *s); |
|||
|
|||
|
|||
#endif // #ifndef _APP_TASK_LOW_POWER_H
|
|||
|
Loading…
Reference in new issue