TimerDelay.#2
上传用户:gxz1972
上传日期:2019-09-13
资源大小:323k
文件大小:1k
- /************************************************
- Delay subroutine
- Copyright 2006 by Vson. All rights reserved.
- Author: Bryan Cai
- Date: 2006.12.21
- Description: soft delay
- Note:
- Identifier abbreviation:
- c-const
- a-array
- p-pointer
- g-global
- uc-unsigned char
- w-unsigned int
- cnt-count
- pnt-point
- Update:
- 2006.12.21 Bryan program header
- ************************************************/
- #include "Include_H.h"
- //---------------------------------
- void DelayMs(unsigned int wDelay10msCount)
- {
- gwDelayCnt = wDelay10msCount;
- IE |= 0x20;
- while(gwDelayCnt);
- IE &= ~0x20;
- }
- void StartTimer2(unsigned int wDelay10msCount)
- {
- gwDelayCnt = wDelay10msCount;
- IE |= 0x20;
- }
- void StopTimer2(void)
- {
- IE &= ~0x20;
- }