summaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-16 17:20:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-16 17:20:36 +0000
commit62fb03e8a5fe25cf15fba1c106d854a0a7cb9b1f (patch)
tree20dbb76bb0ec35303c2a9267d60c872c5c867f0d /apps/examples
parent103151bb4289ed721e1beede1fb057b6b7bbc9cc (diff)
downloadpx4-nuttx-62fb03e8a5fe25cf15fba1c106d854a0a7cb9b1f.tar.gz
px4-nuttx-62fb03e8a5fe25cf15fba1c106d854a0a7cb9b1f.tar.bz2
px4-nuttx-62fb03e8a5fe25cf15fba1c106d854a0a7cb9b1f.zip
Add STM32 watchdog configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4617 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/watchdog/watchdog.h4
-rw-r--r--apps/examples/watchdog/watchdog_main.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/apps/examples/watchdog/watchdog.h b/apps/examples/watchdog/watchdog.h
index 1b36da9b4..e5e906691 100644
--- a/apps/examples/watchdog/watchdog.h
+++ b/apps/examples/watchdog/watchdog.h
@@ -118,7 +118,7 @@
****************************************************************************/
/****************************************************************************
- * Name: watchdog_devinit()
+ * Name: up_wdginitialize()
*
* Description:
* Perform architecuture-specific initialization of the Watchdog hardware.
@@ -127,6 +127,6 @@
*
****************************************************************************/
-int watchdog_devinit(void);
+int up_wdginitialize(void);
#endif /* __APPS_EXAMPLES_WATCHDOG_WATCHDOG_H */
diff --git a/apps/examples/watchdog/watchdog_main.c b/apps/examples/watchdog/watchdog_main.c
index 6d1e1c43a..819f2636f 100644
--- a/apps/examples/watchdog/watchdog_main.c
+++ b/apps/examples/watchdog/watchdog_main.c
@@ -223,7 +223,7 @@ static void parse_args(FAR struct wdog_example_s *wdog, int argc, FAR char **arg
int wdog_main(int argc, char *argv[])
{
struct wdog_example_s wdog;
- uint32_t elapsed;
+ long elapsed;
int fd;
int ret;
@@ -235,10 +235,10 @@ int wdog_main(int argc, char *argv[])
* this test.
*/
- ret = watchdog_devinit();
+ ret = up_wdginitialize();
if (ret != OK)
{
- message("wdog_main: watchdog_devinit failed: %d\n", ret);
+ message("wdog_main: up_wdginitialize failed: %d\n", ret);
goto errout;
}
@@ -251,8 +251,6 @@ int wdog_main(int argc, char *argv[])
CONFIG_EXAMPLES_WATCHDOG_DEVPATH, errno);
goto errout;
}
- message("wdog_main: starting output with frequency: %d duty: %08x count: %d\n",
- info.frequency, info.duty, info.count);
/* Set the watchdog timeout */
@@ -289,7 +287,7 @@ int wdog_main(int argc, char *argv[])
goto errout_with_dev;
}
- message(" ping elapsed=%d\n", elpased);
+ message(" ping elapsed=%ld\n", elapsed);
msgflush();
}
@@ -301,7 +299,7 @@ int wdog_main(int argc, char *argv[])
usleep(wdog.pingdelay * 1000);
- message(" NO ping elapsed=%d\n", elpased);
+ message(" NO ping elapsed=%ld\n", elapsed);
msgflush();
}