TimerDelay.#1
上传用户: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. /*
  23. void DelayMs(unsigned int wDelay10msCount)
  24. {
  25.     gwDelayCnt = wDelay10msCount;
  26. IE |= 0x20;
  27.     while(gwDelayCnt);
  28. IE &= ~0x20;
  29. }
  30. */
  31. void StartTimer2(unsigned int wDelay10msCount)
  32. {
  33.     gwDelayCnt = wDelay10msCount;
  34. IE |= 0x20;
  35. }
  36. void StopTimer2(void)
  37. {
  38. IE &= ~0x20;
  39. }