1 /******************************************************************************
2 ** File Name: boot_drvapi.h *
5 ** Copyright: 2002 Spreatrum, Incoporated. All Rights Reserved. *
6 ** Description: This file defines the logic interfaces called during boot,*
7 ** including reset mode setting, initialization etc.
8 ******************************************************************************
10 ******************************************************************************
12 ** ------------------------------------------------------------------------- *
13 ** DATE NAME DESCRIPTION *
14 ** 31/08/2010 Jeff.Li Create. *
15 ******************************************************************************/
16 #ifndef _BOOT_DRVAPI_H_
17 #define _BOOT_DRVAPI_H_
19 /**---------------------------------------------------------------------------*
21 **---------------------------------------------------------------------------*/
28 TYPE_RESET = 0, //bit[4:0]
29 TYPE_BACKLIGHT, //bit[5]
30 TYPE_DSPEXCEPTION, //bit[6]
40 /**---------------------------------------------------------------------------*
41 ** Function Prototypes *
42 **---------------------------------------------------------------------------*/
43 /*****************************************************************************/
44 // Description: Sets the different kinds of reset modes, used in normal p-
45 // ower up mode, watchdog reset mode and calibration mode etc.
48 /*****************************************************************************/
49 PUBLIC void BOOT_SetRstMode (uint32 val);
51 /*****************************************************************************/
52 // Description: Gets the current reset mode.
55 /*****************************************************************************/
56 PUBLIC uint32 BOOT_GetRstMode (void);
58 /*****************************************************************************/
59 // Description: Sets the backup flag
62 /*****************************************************************************/
63 PUBLIC void BOOT_SetResetFlag (WDG_HW_FLAG_T type, uint32 val);
65 /*****************************************************************************/
66 // Description: Gets the current backup flag.
69 /*****************************************************************************/
70 PUBLIC uint32 BOOT_GetResetFlag (WDG_HW_FLAG_T type);
72 /*****************************************************************************/
73 // Description: After normal power on, the HW_RST flag should be reset in
74 // order to judge differrent reset conditions between normal
75 // power on reset and watchdog reset.
78 /*****************************************************************************/
79 PUBLIC void BOOT_ResetHWFlag (void);
81 /*****************************************************************************/
82 // Description: Get HW Flag
85 /*****************************************************************************/
86 PUBLIC uint32 BOOT_GetWDGHWFlag (WDG_HW_FLAG_T type);
88 /*****************************************************************************/
89 // Description: Before watchdog reset, writting HW_RST flag is uesed to j-
90 // udge differrent watchdog reset conditions between MCU reset
93 // Modified by: Yong.Li
95 /*****************************************************************************/
96 PUBLIC void BOOT_SetWDGHWFlag (WDG_HW_FLAG_T type, uint32 val);
98 /*****************************************************************************/
99 // Description: Gets the flag.
102 /*****************************************************************************/
103 PUBLIC BOOLEAN GetWatchdogMode (void);
105 /*****************************************************************************/
106 // Description: Sets the flag when watchdog resets the system in debug mode.
108 /*****************************************************************************/
109 PUBLIC void SetWatchdogMode (BOOLEAN mode);
112 PUBLIC void BOOT_ResetHWVal(uint32 val);
115 /**---------------------------------------------------------------------------*
117 **---------------------------------------------------------------------------*/
122 #endif //_BOOT_DRVAPI_H_