summaryrefslogtreecommitdiff
path: root/nuttx/include/wdog.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
commitefc2cf23a849f7be1d65c4cdd7767f88917c46a7 (patch)
treefbe3518a364d6b9d811e00f7201e082d50ead7e3 /nuttx/include/wdog.h
parent94e5b72f50f3096b83fe50c7b57324a08e318f29 (diff)
downloadpx4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.gz
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.bz2
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.zip
Progress toward clean SDCC compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/wdog.h')
-rw-r--r--nuttx/include/wdog.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/nuttx/include/wdog.h b/nuttx/include/wdog.h
index 9ef16256c..a1065eaae 100644
--- a/nuttx/include/wdog.h
+++ b/nuttx/include/wdog.h
@@ -55,11 +55,28 @@
* Global Type Declarations
************************************************************/
+/* The arguments are passed as uint32 values. For systems
+ * where the sizeof(pointer) < sizeof(uint32), the following
+ * union defines the alignment of the pointer within the
+ * uint32. For example, the SDCC MCS51 general pointer is
+ * 24-bits, but uint32 is 32-bits (of course).
+ *
+ * For systems where sizeof(pointer) > sizeof(uint32), we will
+ * have to do some redesign.
+ */
+
+union wdparm_u
+{
+ void *pvarg;
+ uint32 *dwarg;
+};
+typedef union wdparm_u wdparm_t;
+
/* This is the form of the function that is called when the
* watchdog function expires. Up to four parameters may be passed.
*/
-typedef void (*wdentry_t)(int arg1, ...);
+typedef void (*wdentry_t)(int argc, uint32 arg1, ...);
/* Watchdog 'handle' */
@@ -81,10 +98,10 @@ extern "C" {
#endif
EXTERN WDOG_ID wd_create(void);
-EXTERN STATUS wd_delete(WDOG_ID wdId);
-EXTERN STATUS wd_start(WDOG_ID wdId, int delay, wdentry_t wdentry,
- int parm1, int parm2, int parm3, int parm4);
-EXTERN STATUS wd_cancel(WDOG_ID wdId);
+EXTERN STATUS wd_delete(WDOG_ID wdog);
+EXTERN STATUS wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry,
+ int argc, ...);
+EXTERN STATUS wd_cancel(WDOG_ID wdog);
#undef EXTERN
#ifdef __cplusplus