Adlink NuPRO-E340 User Manual Page 85

  • Download
  • Add to my manuals
  • Print
  • Page
    / 100
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 84
Watchdog Timer 71
NuPRO-E340
Appendix A - Watchdog Timer
A sample program for configuring the NuPRO-E340’s watchdog
timer is included on the ADLINK All-in-One DVD in the following
directory: \NuPRO\NuPRO-E340\WDT.
A.1 Sample Code
#include<stdio.h>
#include<dos.h>
static unsigned int IT8783_ioPort = 0x2e;
void Enter_IT8783_Config(unsigned int flag)
{
if(flag) IT8783_ioPort = 0x4e;
switch(IT8783_ioPort)
{
case 0x2E: //Address port = 0x2E, enter keys =
0x87, 0x01, 0x55, 0x55
outportb(0x2E, 0x87);
outportb(0x2E, 0x01);
outportb(0x2E, 0x55);
outportb(0x2E, 0x55);
break;
case 0x4E: //Address port = 0x4E, enter keys =
0x87, 0x01, 0x55, 0xAA
outportb(0x4E, 0x87);
outportb(0x4E, 0x01);
outportb(0x4E, 0x55);
outportb(0x4E, 0xAA);
break;
default:
break;
}
}
void Exit_IT8783_Config(unsigned int flag)
{
if(flag) IT8783_ioPort = 0x4e;
outportb(IT8783_ioPort, 0x02);
outportb(IT8783_ioPort+1, 0x02);
Page view 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 99 100

Comments to this Manuals

No comments