📄 timer.h
字号:
//**********************************************************************************************************
// The Software is proprietary, confidential, and valuable to Realtek Semiconductor
// Corporation ("Realtek"). All rights, including but not limited to copyrights,
// patents, trademarks, trade secrets, mask work rights, and other similar rights and interests,
// are reserved to Realtek. Without prior written consent from Realtek, copying, reproduction,
// modification, distribution, or otherwise is strictly prohibited. The Software shall be
// kept strictly in confidence, and shall not be disclosed to or otherwise accessed by
// any third party. @ <2003> - <2008> The Software is provided "AS IS" without any warranty of any kind,
// express, implied, statutory or otherwise.
//**********************************************************************************************************
//----------------------------------------------------------------------------------------------------
// ID Code : Timer.h No.0000
// Update Note :
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Definitions of Timer.c
//--------------------------------------------------
#define _MAX_EVENT_AMOUNT 8
#define _INACTIVE_TIMER_EVENT 0xFFFF
#define _INACTIVE_COUNTDOWN_EVENT 0xFF
//----------------------------------------------------------------------------------------------------
#ifdef __TIMER__
//--------------------------------------------------
// Global Variables
//--------------------------------------------------
struct CTimerEventTable idata TimerEvent[_MAX_EVENT_AMOUNT];
bit bNotifyTimer0Int;
bit bTimer0Ctrl = _FALSE;
BYTE xdata ucTimer0Cnt = 0;
BYTE xdata ucDutyTimerTemp;
//--------------------------------------------------
// Function Prototypes
//--------------------------------------------------
void CTimerHandler(void);
void CTimerActiveTimerEvent(WORD usTime, void (*Event)());
void CTimerReactiveTimerEvent(WORD usTime, void (*Event)());
void CTimerCancelTimerEvent(void (*Event)());
void CTimerInitialTimerEvent(void);
void CTimerDecreaseTimerCnt(void);
void CTimerCountDownEventProc(BYTE *pEventCnt, BYTE ucWaitCnt, void (*Event)(void));
bit CTimerPollingEventProc(BYTE ucTimeout, bit (*Event)(void));
void CTimerDelayXms(WORD usNum);
bit CTimerWaitForEvent(BYTE ucEvent);
#if(_NEW_ADC == _TRUE)
// V010 Patch Note (1) : Adjust ADC Clock Modify
bit CTimerPollingFlagProc(BYTE ucTimeout, BYTE ucPage, BYTE ucRegister, BYTE ucBit, bit bSuccess);
#endif
void CTimerEnaleTimerCount(void);
#else
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
extern struct CTimerEventTable idata TimerEvent[_MAX_EVENT_AMOUNT];
extern bit bNotifyTimer0Int;
extern bit bTimer0Ctrl;
extern BYTE xdata ucTimer0Cnt;
extern BYTE xdata ucDutyTimerTemp;
//--------------------------------------------------
// Extern Function Prototypes
//--------------------------------------------------
extern void CTimerHandler(void);
extern void CTimerActiveTimerEvent(WORD usTime, void (*Event)());
extern void CTimerReactiveTimerEvent(WORD usTime, void (*Event)());
extern void CTimerCancelTimerEvent(void (*Event)());
extern void CTimerInitialTimerEvent(void);
extern void CTimerDecreaseTimerCnt(void);
extern void CTimerCountDownEventProc(BYTE *pEventCnt, BYTE ucWaitCnt, void (*Event)(void));
extern bit CTimerPollingEventProc(BYTE ucTimeout, bit (*Event)(void));
extern void CTimerDelayXms(WORD usNum);
extern bit CTimerWaitForEvent(BYTE ucEvent);
// V010 Patch Note (1) : Adjust ADC Clock Modify
extern bit CTimerPollingFlagProc(BYTE ucTimeout, BYTE ucPage, BYTE ucRegister, BYTE ucBit, bit bSuccess);
extern void CTimerEnaleTimerCount(void);
#endif
//----------------------------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -