TimerDelay.#2
上传用户:gxz1972
上传日期:2019-09-13
资源大小:323k
文件大小:1k
源码类别:

传真(Fax)编程

开发平台:

C/C++

  1. /************************************************
  2. Delay subroutine
  3. Copyright 2006 by Vson. All rights reserved.
  4. Author:      Bryan Cai
  5. Date:        2006.12.21
  6. Description: soft delay
  7. Note:
  8. Identifier abbreviation: 
  9.                          c-const
  10.                          a-array
  11.                          p-pointer
  12.                          g-global
  13.                          uc-unsigned char
  14.                          w-unsigned int
  15.                          cnt-count
  16.                          pnt-point
  17. Update:
  18.       2006.12.21  Bryan      program header
  19. ************************************************/
  20. #include "Include_H.h" 
  21. //---------------------------------
  22. void DelayMs(unsigned int wDelay10msCount)
  23. {
  24.     gwDelayCnt = wDelay10msCount;
  25. IE |= 0x20;
  26.     while(gwDelayCnt);
  27. IE &= ~0x20;
  28. }
  29. void StartTimer2(unsigned int wDelay10msCount)
  30. {
  31.     gwDelayCnt = wDelay10msCount;
  32. IE |= 0x20;
  33. }
  34. void StopTimer2(void)
  35. {
  36. IE &= ~0x20;
  37. }