2012-04-16 00:31:05 +02:00
|
|
|
/****************************************************************************
|
2024-04-17 15:18:50 +02:00
|
|
|
* apps/examples/watchdog/watchdog.h
|
2012-04-16 00:31:05 +02:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2012-04-16 00:31:05 +02:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2012-04-16 00:31:05 +02:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2012-04-16 00:31:05 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __APPS_EXAMPLES_WATCHDOG_WATCHDOG_H
|
|
|
|
#define __APPS_EXAMPLES_WATCHDOG_WATCHDOG_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
2015-10-02 22:06:11 +02:00
|
|
|
* Pre-processor Definitions
|
2012-04-16 00:31:05 +02:00
|
|
|
****************************************************************************/
|
2024-04-17 15:18:50 +02:00
|
|
|
|
2012-04-16 00:31:05 +02:00
|
|
|
/* Configuration ************************************************************/
|
2024-04-17 15:18:50 +02:00
|
|
|
|
2012-04-16 00:31:05 +02:00
|
|
|
/* CONFIG_NSH_BUILTIN_APPS - Build the WATCHDOG test as an NSH built-in
|
2019-10-06 14:14:39 +02:00
|
|
|
* function.
|
2012-04-16 00:31:05 +02:00
|
|
|
* CONFIG_EXAMPLES_WATCHDOG_DEVPATH - The path to the Watchdog device.
|
|
|
|
* Default: /dev/watchdog0
|
|
|
|
* CONFIG_EXAMPLES_WATCHDOG_PINGTIME - Time in milliseconds that the example
|
|
|
|
* will ping the watchdog before letting the watchdog expire. Default: 5000
|
|
|
|
* milliseconds
|
|
|
|
* CONFIG_EXAMPLES_WATCHDOG_PINGDELAY - Time delay between pings in
|
|
|
|
* milliseconds. Default: 500 milliseconds.
|
|
|
|
* CONFIG_EXAMPLES_WATCHDOG_TIMEOUT - The watchdog timeout value in
|
|
|
|
* milliseconds before the watchdog timer expires. Default: 2000
|
|
|
|
* milliseconds.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_WATCHDOG
|
|
|
|
# error "WATCHDOG device support is not enabled (CONFIG_WATCHDOG)"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_EXAMPLES_WATCHDOG_DEVPATH
|
|
|
|
# define CONFIG_EXAMPLES_WATCHDOG_DEVPATH "/dev/watchdog0"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_EXAMPLES_WATCHDOG_PINGTIME
|
|
|
|
# define CONFIG_EXAMPLES_WATCHDOG_PINGTIME 5000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_EXAMPLES_WATCHDOG_PINGDELAY
|
|
|
|
# define CONFIG_EXAMPLES_WATCHDOG_PINGDELAY 500
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_EXAMPLES_WATCHDOG_TIMEOUT
|
|
|
|
# define CONFIG_EXAMPLES_WATCHDOG_TIMEOUT 2000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
2016-02-22 01:15:00 +01:00
|
|
|
* Public Data
|
2012-04-16 00:31:05 +02:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#endif /* __APPS_EXAMPLES_WATCHDOG_WATCHDOG_H */
|