UC-7400-LX Plus User’s Manual
Programmer’s Guide
5-7
int swtd_disable(int fd)
Description:
Disable the watchdog in the application. The kernel will automatically acknowledge the
watchdog.
Input:
int fd — the file handle from the return value of swtd_open().
Output:
0 if OK. An error occurs if you see a non-zero value. Use the function errno () to retrieve
the error code.
int swtd_get(int fd, int *mode, unsigned long *time)
Description:
Get current settings.
mode —
1 to set user mode
0 to set kernel mode
time — The time period to acknowledge the watchdog.
Input:
int fd — the file handle from swtd_open().
int *mode — the function will return the status of the watchdog function
unsigned long *time — the function will return the current time period.
Output:
0 if OK. An error occurs if you see a non-zero value. Use the function errno () to retrieve
the error code.
int swtd_ack(int fd)
Description:
Acknowledge the watchdog. When the user application enables the watchdog, it needs to
call this function periodically with time predefined by the user in the application program.
Input:
int fd — the file handle from the swtd_open() return value.
Output:
0 if OK. An error occurs if you see a non-zero value. Use the function errno () to retrieve
the error code.
int swtd_close(int fd)
Description:
Close the file handle.
Input:
int fd — the file handle from the return value of swtd_open().
Output:
0 if OK. An error occurs if you see a non-zero value. Use the function errno () to retrieve
the error code.