#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <fcntl.h>

#define MOTOR_MAGIC 'L'
#define FEED_DOG _IOW(MOTOR_MAGIC, 0, int)

int main()
{
	int fd, retval;
	int i = 15;
	char cmd;

	fd = open("/dev/qy_watchdog", O_RDWR);
	if (fd < 0)
	{
		perror("Open device watchdog error!\n");
		exit(1);
	}

	while (1)
	{
		retval = ioctl(fd, FEED_DOG, 0);
		sleep(1);
	}
	close(fd);
	return 0;
}
