IBASE FWA8206 User Manual

Page 30

Advertising
background image

FWA8206 Series User’s Manual

18


if ( iopl(3) ) {

fprintf(stderr, "iopl(): %s\n", strerror(errno));

return -1;

}

by_pass_init();

/* Enable watchdog function and retrigger TIMEOUT countdown */
enable_wdt();

for(;;)

{

sleep(1);/* Function check.

if timeout, switch to By Pass mode.

Or , call retrigger() for retrigger WDT. */

/* Display countdown */

outb(0xf6,0x4e);

c = inb(0x4f);

printf("Watchdog countdown %d\n",c);

if ( ! c ) {

printf("Switch to Bypass mode !\n");

break;

}

//retrigger();//retrigger watchdog

}

//dis_wdt();//Disable watchdog function

return

0;

}

Advertising