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]
35 /**---------------------------------------------------------------------------*
36 ** Function Prototypes *
37 **---------------------------------------------------------------------------*/
38 /*****************************************************************************/
39 // Description: Sets the different kinds of reset modes, used in normal p-
40 // ower up mode, watchdog reset mode and calibration mode etc.
43 /*****************************************************************************/
44 PUBLIC void BOOT_SetRstMode (uint32 val);
46 /*****************************************************************************/
47 // Description: Gets the current reset mode.
50 /*****************************************************************************/
51 PUBLIC uint32 BOOT_GetRstMode (void);
53 /*****************************************************************************/
54 // Description: Sets the backup flag
57 /*****************************************************************************/
58 PUBLIC void BOOT_SetResetFlag (WDG_HW_FLAG_T type, uint32 val);
60 /*****************************************************************************/
61 // Description: Gets the current backup flag.
64 /*****************************************************************************/
65 PUBLIC uint32 BOOT_GetResetFlag (WDG_HW_FLAG_T type);
67 /*****************************************************************************/
68 // Description: After normal power on, the HW_RST flag should be reset in
69 // order to judge differrent reset conditions between normal
70 // power on reset and watchdog reset.
73 /*****************************************************************************/
74 PUBLIC void BOOT_ResetHWFlag ();
76 /*****************************************************************************/
77 // Description: Get HW Flag
80 /*****************************************************************************/
81 PUBLIC uint32 BOOT_GetWDGHWFlag (WDG_HW_FLAG_T type);
83 /*****************************************************************************/
84 // Description: Before watchdog reset, writting HW_RST flag is uesed to j-
85 // udge differrent watchdog reset conditions between MCU reset
88 // Modified by: Yong.Li
90 /*****************************************************************************/
91 PUBLIC void BOOT_SetWDGHWFlag (WDG_HW_FLAG_T type, uint32 val);
93 /*****************************************************************************/
94 // Description: Gets the flag.
97 /*****************************************************************************/
98 PUBLIC BOOLEAN GetWatchdogMode (void);
100 /*****************************************************************************/
101 // Description: Sets the flag when watchdog resets the system in debug mode.
103 /*****************************************************************************/
104 PUBLIC void SetWatchdogMode (BOOLEAN mode);
107 PUBLIC void BOOT_ResetHWVal(uint32 val);
110 /**---------------------------------------------------------------------------*
112 **---------------------------------------------------------------------------*/
117 #endif //_BOOT_DRVAPI_H_