1 /****************************************************************************
2  * boot/nuttx/include/watchdog/watchdog.h
3  *
4  * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  ****************************************************************************/
19 
20 #ifndef __BOOT_NUTTX_INCLUDE_WATCHDOG_WATCHDOG_H
21 #define __BOOT_NUTTX_INCLUDE_WATCHDOG_WATCHDOG_H
22 
23 /****************************************************************************
24  * Public Function Prototypes
25  ****************************************************************************/
26 
27 /****************************************************************************
28  * Name: mcuboot_watchdog_feed
29  *
30  * Description:
31  *   Reset the watchdog timer to the current timeout value, preventing any
32  *   imminent watchdog timeouts.
33  *
34  * Input Parameters:
35  *   None.
36  *
37  * Returned Value:
38  *   None.
39  *
40  ****************************************************************************/
41 
42 void mcuboot_watchdog_feed(void);
43 
44 /****************************************************************************
45  * Public Function Prototypes
46  ****************************************************************************/
47 
48 /****************************************************************************
49  * Name: mcuboot_watchdog_init
50  *
51  * Description:
52  *   Initialize the watchdog timer by setting the trigger timeout and
53  *   starting it.
54  *
55  * Input Parameters:
56  *   None.
57  *
58  * Returned Value:
59  *   OK on success, ERROR if not.
60  *
61  ****************************************************************************/
62 
63 int mcuboot_watchdog_init(void);
64 
65 #endif /* __BOOT_NUTTX_INCLUDE_WATCHDOG_WATCHDOG_H */
66