diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-16 17:20:36 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-16 17:20:36 +0000 |
commit | 03a9d63580b10f9ebd185fe158aee557d32c3ad8 (patch) | |
tree | 20dbb76bb0ec35303c2a9267d60c872c5c867f0d /apps | |
parent | 845bf4b991a2a47b3f9319d6cf3ef311cba6364b (diff) |
Add STM32 watchdog configuration
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4617 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/ChangeLog.txt | 2 | ||||
-rw-r--r-- | apps/examples/watchdog/watchdog.h | 4 | ||||
-rw-r--r-- | apps/examples/watchdog/watchdog_main.c | 12 | ||||
-rw-r--r-- | apps/graphics/tiff/tiff_initialize.c | 4 |
4 files changed, 10 insertions, 12 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index a70a9406d9..9dcb3ad1f5 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -225,4 +225,4 @@ * Kconfig: Continued Kconfig file updates (no longer tracking on a per-file basis in the ChangeLog) * apps/examples/watchdog: Add a watchdog timer example. - + * apps/examples/tiff: Fix wrong path used for temporary file. diff --git a/apps/examples/watchdog/watchdog.h b/apps/examples/watchdog/watchdog.h index 1b36da9b4e..e5e906691a 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 6d1e1c43a2..819f2636fd 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(); } diff --git a/apps/graphics/tiff/tiff_initialize.c b/apps/graphics/tiff/tiff_initialize.c index 0e5b3229ce..3e1328eb2c 100644 --- a/apps/graphics/tiff/tiff_initialize.c +++ b/apps/graphics/tiff/tiff_initialize.c @@ -474,10 +474,10 @@ int tiff_initialize(FAR struct tiff_info_s *info) goto errout; } - info->tmp2fd = open(info->tmpfile1, O_RDWR|O_CREAT|O_TRUNC, 0666); + info->tmp2fd = open(info->tmpfile2, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->tmp2fd < 0) { - gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno); + gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno); goto errout; } |