Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
timer.h
Package: ST_5105DTV.rar [view]
Upload User: fy98168
Upload Date: 2015-06-26
Package Size: 13771k
Code Size: 1k
Category:
DVD
Development Platform:
C/C++
- #ifndef __TIMER_H
- #define __TIMER_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "gendef.h"
- #define KB_TIMER_INVALID_ID (0xFFFFFFFF)
- typedef void (*KB_TIMER_FUNC_POINTER)(void*);
- typedef enum
- {
- KB_TIMER_REPEAT = 0,
- KB_TIMER_ONCE,
- KB_TIMER_MAX
- }KB_TimerMode;
- #define TIMER_TICK_INT_PERIOD (100)
- #ifdef ST_OS21
- #define TIMER_STACK_SIZE (1024 * 16)
- #else
- #define TIMER_STACK_SIZE (1024 * 2)
- #endif
- #define CHECK_TIMER_ID(n)
- if((n) == KB_TIMER_INVALID_ID)
- return RETFAIL3
- typedef enum
- {
- TIMER_FINISH_NORMAL = 0,
- TIMER_FINISH_ENABLE,
- TIMER_FINISH_DISABLE,
- TIMER_FINISH_DELETE
- }TIMR_FINISH_t;
- typedef struct TIMER_STRUCT T_TIMER_st;
- struct TIMER_STRUCT
- {
- UINT32 current_count;
- UINT32 initial_ms;
- T_TIMER_st *next;
- T_TIMER_st *prev;
- KB_TimerMode mode;
- KB_TIMER_FUNC_POINTER entry;
- void *param; /* the parameter of entry */
- UINT8 valid;
- UINT8 enabled;
- UINT8 repeat1;
- };
- INT32 KB_TimerInit(void);
- UINT32 KB_TimerCreate(KB_TimerMode mode, KB_TIMER_FUNC_POINTER entry, void *param);
- INT32 KB_TimerDel(UINT32 timerId);
- INT32 KB_TimerEnable(UINT32 timerId, UINT32 ms);
- INT32 KB_TimerDisable(UINT32 timerId);
- #ifdef __cplusplus
- }
- #endif
- #endif /* __TIMER_H */