lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2007, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: hal_wdt.c
|
| 5 | * File Mark:
|
| 6 | * Description: watchdog hal interface header file
|
| 7 | * Others:
|
| 8 | * Version:
|
| 9 | * Author: limeifeng
|
| 10 | * Date: 2014.05.21
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | * History 2:
|
| 17 | ******************************************************************************/
|
| 18 |
|
| 19 | #ifndef DRVS_WDT_H
|
| 20 | #define DRVS_WDT_H
|
| 21 | /****************************************************************************
|
| 22 | * Include files
|
| 23 | ****************************************************************************/
|
| 24 |
|
| 25 | /****************************************************************************
|
| 26 | * Local Macros
|
| 27 | ****************************************************************************/
|
| 28 |
|
| 29 | /****************************************************************************
|
| 30 | * Local Types
|
| 31 | ****************************************************************************/
|
| 32 | typedef VOID (*wdt_func)(VOID);
|
| 33 |
|
| 34 | /****************************************************************************
|
| 35 | * Local Constants
|
| 36 | ****************************************************************************/
|
| 37 |
|
| 38 | /****************************************************************************
|
| 39 | * Local Function Prototypes
|
| 40 | ****************************************************************************/
|
| 41 |
|
| 42 | /****************************************************************************
|
| 43 | * Global Constants
|
| 44 | ****************************************************************************/
|
| 45 |
|
| 46 | /****************************************************************************
|
| 47 | * Global Variables
|
| 48 | ****************************************************************************/
|
| 49 | /****************************************************************************
|
| 50 | * Global Function Prototypes
|
| 51 | ****************************************************************************/
|
| 52 |
|
| 53 | /****************************************************************************
|
| 54 | * Function Definitions
|
| 55 | ****************************************************************************/
|
| 56 |
|
| 57 | /*******************************************************************************
|
| 58 | * Function: zDrvWdt_Start
|
| 59 | * Description:Start watchdog
|
| 60 | * Parameters:
|
| 61 | * Input:
|
| 62 | *
|
| 63 | * Output:
|
| 64 | *
|
| 65 | * Returns:
|
| 66 | *
|
| 67 | *
|
| 68 | * Others:
|
| 69 | ********************************************************************************/
|
| 70 | //VOID zDrvWdt_Start(VOID);
|
| 71 |
|
| 72 |
|
| 73 | /*******************************************************************************
|
| 74 | * Function: zDrvWdt_Stop
|
| 75 | * Description: stop watchdog
|
| 76 | * Parameters:
|
| 77 | * Input:
|
| 78 | *
|
| 79 | * Output:
|
| 80 | *
|
| 81 | * Returns:
|
| 82 | *
|
| 83 | *
|
| 84 | * Others:
|
| 85 | ********************************************************************************/
|
| 86 | VOID zDrvWdt_Stop(VOID);
|
| 87 |
|
| 88 | /*******************************************************************************
|
| 89 | * Function: zDrvWdt_GetValue
|
| 90 | * Description: get watchdog current counter value
|
| 91 | * Parameters:
|
| 92 | * Input:
|
| 93 | *
|
| 94 | * Output:
|
| 95 | *
|
| 96 | * Returns: watchdog current counter value
|
| 97 | *
|
| 98 | *
|
| 99 | * Others:
|
| 100 | ********************************************************************************/
|
| 101 | //UINT32 zDrvWdt_GetValue(void);
|
| 102 |
|
| 103 | /*******************************************************************************
|
| 104 | * Function: zDrvWdt_FeedDog
|
| 105 | * Description:Feed watchdog
|
| 106 | * Parameters:
|
| 107 | * Input: value: 0x0--0xffff
|
| 108 | *
|
| 109 | * Output:
|
| 110 | *
|
| 111 | * Returns:
|
| 112 | *
|
| 113 | *
|
| 114 | * Others:
|
| 115 | ********************************************************************************/
|
| 116 | //void zDrvWdt_FeedDog(UINT32 value);
|
| 117 |
|
| 118 | /*******************************************************************************
|
| 119 | * Function: zDrvWdt_Initiate
|
| 120 | * Description: watchdog initiate
|
| 121 | * Parameters:
|
| 122 | * Input:
|
| 123 | *
|
| 124 | * Output:
|
| 125 | *
|
| 126 | * Returns:
|
| 127 | *
|
| 128 | *
|
| 129 | * Others:
|
| 130 | ********************************************************************************/
|
| 131 | SINT32 zDrvWdt_Initiate(void);
|
| 132 |
|
| 133 | void zDrvWdt_Handle_After_Psm(void);
|
| 134 |
|
| 135 | void zDrvWdt_Handle_Before_Psm(void);
|
| 136 |
|
| 137 | SINT32 zDrvWdt_Register_Handle(wdt_func func, UINT32 interval, bool wakeup, char *handle_name);
|
| 138 |
|
| 139 | SINT32 zDrvWdt_Set_WdtNv(BOOL NvFlag);
|
| 140 | #endif
|
| 141 |
|