C51 COMPILER V9.59.0.0 STC8A_WDT 06/10/2021 10:21:46 PAGE 1 C51 COMPILER V9.59.0.0, COMPILATION OF MODULE STC8A_WDT OBJECT MODULE PLACED IN .\list\STC8A_WDT.obj COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE ..\Driver\src\STC8A_WDT.c LARGE OMF2 OPTIMIZE(8,SPEED) BROWSE INCDIR(..\ -Driver\inc;..\User;..\App\inc) DEBUG PRINT(.\list\STC8A_WDT.lst) TABS(2) OBJECT(.\list\STC8A_WDT.obj) line level source 1 /*---------------------------------------------------------------------*/ 2 /* --- STC MCU Limited ------------------------------------------------*/ 3 /* --- STC 1T Series MCU Demo Programme -------------------------------*/ 4 /* --- Mobile: (86)13922805190 ----------------------------------------*/ 5 /* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/ 6 /* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/ 7 /* --- Web: www.STCMCU.com --------------------------------------------*/ 8 /* --- Web: www.STCMCUDATA.com ---------------------------------------*/ 9 /* --- QQ: 800003751 -------------------------------------------------*/ 10 /* 如果要在程序中使用此代码,请在程序中注明使用了STC的资料及程序 */ 11 /*---------------------------------------------------------------------*/ 12 13 #include "STC8A_WDT.h" 14 15 //======================================================================== 16 // 函数: void WDT_Inilize(WDT_InitTypeDef *WDT) 17 // 描述: 看门狗初始化程序. 18 // 参数: WDT: 结构参数,请参考WDT.h里的定义. 19 // 返回: none. 20 // 版本: V1.0, 2020-09-16 21 //======================================================================== 22 void WDT_Inilize(WDT_InitTypeDef *WDT) 23 { 24 1 if(WDT->WDT_Enable == ENABLE) WDT_CONTR = D_EN_WDT; //使能看门狗 25 1 26 1 WDT_PS_Set(WDT->WDT_PS); //看门狗定时器时钟分频系数 WDT_SCALE_2,WDT_SCALE_4,WDT_SCALE_8,WDT_SCALE_16,WDT -_SCALE_32,WDT_SCALE_64,WDT_SCALE_128,WDT_SCALE_256 27 1 if(WDT->WDT_IDLE_Mode == WDT_IDLE_STOP) WDT_CONTR &= ~0x08; //IDLE模式停止计数 28 1 else WDT_CONTR |= 0x08; //IDLE模式继续计数 29 1 } 30 31 /********************* 清除看门狗函数 *************************/ 32 void WDT_Clear (void) 33 { 34 1 WDT_CONTR |= D_CLR_WDT; // 喂狗 35 1 } MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 46 ---- CONSTANT SIZE = ---- ---- XDATA SIZE = ---- ---- PDATA SIZE = ---- ---- DATA SIZE = ---- ---- IDATA SIZE = ---- ---- BIT SIZE = ---- ---- EDATA SIZE = ---- ---- HDATA SIZE = ---- ---- XDATA CONST SIZE = ---- ---- FAR CONST SIZE = ---- ---- END OF MODULE INFORMATION. C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)