1 /*******************************************************************************
2 ** File Name: sc8810_timer_cfg.h *
5 ** Copyright: Copyright 2001-xxxx by Spreadtrum Communications,Inc. *
6 * All Rights Reserved. *
7 ** This software is supplied under the terms of a license *
8 ** agreement or non-disclosure agreement with Spreadtrum. *
9 ** Passing on and copying of this document,and communication *
10 ** of its contents is not permitted without prior written *
12 ** Description: This is the header file of defines signals of the sim *
13 ** application layer *
14 *******************************************************************************
16 *******************************************************************************
18 ** ---------------------------------------------------------------------------*
19 ** Date Name Description *
20 **----------------------------------------------------------------------------*
21 ** 2010.11.1 Ji.Ding Create *
22 ******************************************************************************/
25 #ifndef __SC8810_TIMER_CFG_H__
26 #define __SC8810_TIMER_CFG_H__
28 /*******************************************************************************
30 ******************************************************************************/
32 /*******************************************************************************
34 ******************************************************************************/
41 /*******************************************************************************
42 ** Mcaro Definitions *
43 ******************************************************************************/
44 /* this is depend on the SOC timer resource */
45 #define TIMER_PHY_NUMBER 3
47 /*******************************************************************************
48 ** Structures Definitions *
49 ******************************************************************************/
50 /* the timer support mode */
58 /* the desciption of timer phy capability */
61 TIMER_PHY_MODE_E mode; //work mode
63 uint32 clk_freq; //frequency of timer
64 uint32 max_count; //max load count
65 uint32 max_us; // max load count transfer to max us
66 uint32 cnt_per_timeunit; // how many count for one time unit
68 uint32 current_value; //current count
69 uint32 running_status; //running or stop
70 uint32 irq_status; //irq be enabled or disabled
73 /*******************************************************************************
75 ******************************************************************************/
77 /*******************************************************************************
78 ** Function prototype *
79 ******************************************************************************/
80 /******************************************************************************/
81 // Description: get timer number
82 // Global resource dependence:
85 // Return value: number of phy timer
86 /******************************************************************************/
87 #define TIMER_CFG_get_number() (TIMER_PHY_NUMBER)
89 /******************************************************************************/
90 // Description: get appointed timer's capability
91 // Global resource dependence:
94 // Return value: TIMER_PHY_STATUS_T *
95 /******************************************************************************/
96 PUBLIC TIMER_PHY_STATUS_T *TIMER_CFG_get_status (uint32 timer_id);
98 /*******************************************************************************
100 ******************************************************************************/
104 /**---------------------------------------------------------------------------*/
105 #endif //__SC8810_TIMER_CFG_H__