DA-660-8/16-LXUser’s Manual
Programmer’s Guide
5-6
Output
The output will be zero if everything is OK. Any other value indicates an error. Use the
errno()
function to get the actual error description.
int swtd_disable(int fd)
Description
Disable the application Watch Dog. The kernel will auto acknowledge the action.
Input
int fd - the file handle from swtd_open() return value.
Output
The output will be zero if everything is OK. Any other value indicates an error. Use the
errno()
function to get the actual error description.
int swtd_get(int fd, int *mode, unsigned long *time)
Description
Get the current settings.
mode –
1 if user application enables the Watch Dog: need to acknowledge the action.
0 if user application disables Watch Dog: does not need to acknowledge the action.
time – The time period to acknowledge the Watch Dog.
Input
int fd - the file handle from swtd_open() return value.
int *mode
- the function will be return the status - enable or disable the user
application; indicate whether an acknowledgement is necessary.
unsigned long *time
- the function will return the current time period.
Output
The output will be zero if everything is OK. Any other value indicates an error. Use the
errno() function to get the actual error description.
int swtd_ack(int fd)
Description
Acknowledge the Watch Dog. When the user application enables the Watch Dog, it needs
to call this function periodically with the user predefined time in the application program.
Input
int fd - the file handle from swtd_open() return value.
Output
The output will be zero if everything is OK. Any other value indicates an error. Use the
errno() function to get the actual error description.