1 /******************************************************************************
2 ** File Name: clock_hal_internal.h *
5 ** Copyright: 2002 Spreatrum, Incoporated. All Rights Reserved. *
7 ******************************************************************************/
8 #ifndef _CLOCK_HAL_INTERNAL_H_
9 #define _CLOCK_HAL_INTERNAL_H_
16 /******************************************************************************
18 ******************************************************************************/
19 #define CLOCK_SUCCESS 0
23 typedef struct _CLOCK_OBJECT CLOCK_OBJECT;
24 struct _DEVICE_OBJECT;
25 typedef struct _DEVICE_OBJECT DEVICE_OBJECT;
26 typedef uint32 CLOCK_STATUS;
28 /*****************************************************************************/
29 // Description: Config all system clocks and devices
30 // Global resource dependence:
33 /*****************************************************************************/
34 PUBLIC CLOCK_STATUS CLOCK_Config (void);
36 /*****************************************************************************/
37 // Description: Open device
38 // Global resource dependence:
41 /*****************************************************************************/
42 PUBLIC CLOCK_STATUS DEVICE_OpenClock (DEVICE_OBJECT *thiz);
44 /*****************************************************************************/
45 // Description: Reset device
46 // Global resource dependence:
49 /*****************************************************************************/
50 PUBLIC CLOCK_STATUS DEVICE_Reset (DEVICE_OBJECT *thiz);
52 /*****************************************************************************/
53 // Description: Close device
54 // Global resource dependence:
57 /*****************************************************************************/
58 PUBLIC CLOCK_STATUS DEVICE_CloseClock (DEVICE_OBJECT *thiz);
60 /*****************************************************************************/
61 // Description: Set device's work clock
62 // Global resource dependence:
65 /*****************************************************************************/
66 PUBLIC CLOCK_STATUS DEVICE_SetClockAndDiv (DEVICE_OBJECT *thiz, int ClockValue, int Div);
68 /*****************************************************************************/
69 // Description: Set device's work clock
70 // Global resource dependence:
73 /*****************************************************************************/
74 PUBLIC CLOCK_STATUS DEVICE_SetClock (DEVICE_OBJECT *thiz, int ClockValue);
76 /*****************************************************************************/
77 // Description: Set device's work clock
78 // Global resource dependence:
81 /*****************************************************************************/
82 PUBLIC CLOCK_STATUS DEVICE_EnableClock (DEVICE_OBJECT *thiz);
84 /*****************************************************************************/
85 // Description: Set device's work clock
86 // Global resource dependence:
89 /*****************************************************************************/
90 PUBLIC CLOCK_STATUS DEVICE_DisableClock (DEVICE_OBJECT *thiz);
92 /*****************************************************************************/
93 // Description: Set device's work clock
94 // Global resource dependence:
97 /*****************************************************************************/
98 PUBLIC CLOCK_STATUS DEVICE_SetDiv (DEVICE_OBJECT *thiz, int Div);
100 /*****************************************************************************/
101 // Description: Get device's work clock
102 // Global resource dependence:
105 /*****************************************************************************/
106 PUBLIC uint32 DEVICE_GetClock (DEVICE_OBJECT *thiz);
112 #endif //_CLOCK_HAL_INTERNAL_H_