fix:修复调光时间BUG
解决调光时间一样的情况下,调光亮与调光灭的实际调光时间不一致问题
This commit is contained in:
40
WDT.h
Normal file
40
WDT.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* --- STC MCU Limited ------------------------------------------------*/
|
||||
/* --- STC 1T Series MCU Demo Programme -------------------------------*/
|
||||
/* --- Mobile: (86)13922805190 ----------------------------------------*/
|
||||
/* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/
|
||||
/* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/
|
||||
/* --- Web: www.STCMCU.com --------------------------------------------*/
|
||||
/* --- Web: www.STCMCUDATA.com ---------------------------------------*/
|
||||
/* --- QQ: 800003751 -------------------------------------------------*/
|
||||
/* <20><><EFBFBD><EFBFBD>Ҫ<EFBFBD>ڳ<EFBFBD><DAB3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ô˴<C3B4><CBB4><EFBFBD>,<2C><><EFBFBD>ڳ<EFBFBD><DAB3><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD>STC<54><43><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD> */
|
||||
/*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __WDT_H
|
||||
#define __WDT_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define WDT_IDLE_STOP 0
|
||||
#define WDT_IDLE_RUN 1
|
||||
|
||||
#define WDT_SCALE_2 0 /* WDT Timeout=(12*32768*SCALE)/SYSclk */
|
||||
#define WDT_SCALE_4 1
|
||||
#define WDT_SCALE_8 2
|
||||
#define WDT_SCALE_16 3
|
||||
#define WDT_SCALE_32 4
|
||||
#define WDT_SCALE_64 5
|
||||
#define WDT_SCALE_128 6
|
||||
#define WDT_SCALE_256 7
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 WDT_Enable; //<2F><><EFBFBD>Ź<EFBFBD>ʹ<EFBFBD><CAB9> ENABLE,DISABLE
|
||||
u8 WDT_IDLE_Mode; //IDLEģʽֹͣ<CDA3><D6B9><EFBFBD><EFBFBD> WDT_IDLE_STOP,WDT_IDLE_RUN
|
||||
u8 WDT_PS; //<2F><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>ʱ<EFBFBD><CAB1>ʱ<EFBFBD>ӷ<EFBFBD>Ƶϵ<C6B5><CFB5> WDT_SCALE_2,WDT_SCALE_4,WDT_SCALE_8,WDT_SCALE_16,WDT_SCALE_32,WDT_SCALE_64,WDT_SCALE_128,WDT_SCALE_256
|
||||
} WDT_InitTypeDef;
|
||||
|
||||
void WDT_Inilize(WDT_InitTypeDef *WDT);
|
||||
void WDT_Clear (void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user