19
Sample Code
C Language for Watchdog Timer under DOS.
#include<stdio.h>
#include<dos.h>
static unsigned int 83627UHG_Port = 0x2e;
{
Outportb(83627UHG_Port,0x87);
Outportb(83627UHG_Port,0x87);
}
void W83627UHG_WDT(unsigned int count_setup)
{
unsigned int Counting, Register_Setup;
outportb(83627UHG_Port, 0x07);
outportb(83627U1, 8); // set as Logical
Device 8
if(count_value >= 60)
{
outportb(83627UHG_Port, 0xf5);
Register_Setup = inportb(83627U1);
Register_Setup |= 0x08;
outportb(83627U1, Register_Setup); /
/ set as minute mode
counting = count_setup / 60;
if((count_value%60) > 30)
c+;
if(counting > 255)
counting = 255;
printf("WDT timeout in %d minutes.\n",
counting);
}
else
{
outportb(83627UHG_Port, 0xf5);
Register_Setup = inportb(83627U1);
Register_Setup &= 0xf7;
outportb(83627U1, Register_Setup); /
/ set as second mode
Counting = count_setup;
Содержание HS-7165
Страница 10: ...4 1 3 Board Dimensions...
Страница 14: ...8 3 2 Board Layout...
Страница 30: ...24 This page is the blank page...
Страница 42: ...36 This is the blank page...