1 /******************************************************************************
2 ** File Name: syscnt_drvapi.h *
5 ** Copyright: 2002 Spreatrum, Incoporated. All Rights Reserved. *
6 ** Description: This file define the basic interfaces of System Counter *
7 ******************************************************************************
9 ******************************************************************************
11 ** ------------------------------------------------------------------------- *
12 ** DATE NAME DESCRIPTION *
13 ** 01/20/2007 Nick.zhao Create. *
14 ******************************************************************************/
15 #ifndef _SYSCNT_DRVAPI_H_
16 #define _SYSCNT_DRVAPI_H_
18 /**---------------------------------------------------------------------------*
20 **---------------------------------------------------------------------------*/
22 /**---------------------------------------------------------------------------*
24 **---------------------------------------------------------------------------*/
26 /**---------------------------------------------------------------------------*
28 **---------------------------------------------------------------------------*/
33 /**---------------------------------------------------------------------------*
34 ** MACRO Definations *
35 **---------------------------------------------------------------------------*/
36 #define MIN_SYS_TIMER_TIME 0x1
38 //define the syscnt timer callback type
39 typedef void (*SYSCNT_CALLBACK) (uint32);
42 /**---------------------------------------------------------------------------*
44 **---------------------------------------------------------------------------*/
45 /*********************************************************************/
46 // Description: Initialize the System counter
53 /*********************************************************************/
54 PUBLIC void Syscnt_Init (void);
57 /*********************************************************************/
58 // Description: Set the syscnt timer
60 // time The time to be set (ms)
61 // st_fun The callback function
62 // param The callback function's parameter
67 /*********************************************************************/
68 PUBLIC uint32 Syscnt_SetTimer (uint32 time, SYSCNT_CALLBACK st_fun, uint32 param);
70 /*********************************************************************/
71 // Description: the Syscnt timer's isr
78 /*********************************************************************/
79 PUBLIC void Syscnt_ISR (uint32 int_num);
81 /*********************************************************************/
82 // Description: Clear the current timer
87 /*********************************************************************/
88 void Syscnt_ClearTimer (void);
91 /**---------------------------------------------------------------------------*
93 **---------------------------------------------------------------------------*/
98 #endif //_SYSCNT_DRVAPI_H_