Acrosser AR-N8601 Manuel d'utilisateur Page 18

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 31
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 17
AR-B8601 User Manual
18
BYTE Format=0x01; // Default is 0x01 = Seconds
if ( argc != 3 )
{ Show_Title(); return 1; }
clrscr();
textcolor(YELLOW+BLINK);
Time=atoi(argv[1]);
Time_Format=argv[2][0];
if(Time_Format=='m' || Time_Format=='M')
Format=0x05; // Minutes
if(Time_Format=='s' || Time_Format=='S')
Format=0x01; // Seconds
// Set Watchdog
outportb(IO_Port_Address,0x87); // (EFER) Extended Functions Enable Register
outportb(IO_Port_Address,0x87);
outportb(IO_Port_Address,0x29); // Point to Global Reg.
outportb(IO_Port_Address+1,0x20); // Select Multi-Function pin, (Bit[5,6]=01 Watchdog Function)
outportb(IO_Port_Address,0x07); // Point to Logical Device Number Reg.
outportb(IO_Port_Address+1,0x08); // Select logical device 8, (Watchdog Function)
outportb(IO_Port_Address,0x30); // Device Active register
outportb(IO_Port_Address+1,0x01);
outportb(IO_Port_Address,0xF3); // Select Watchdog count mode seconds or minutes
outportb(IO_Port_Address+1,Format); // Default is second
outportb(IO_Port_Address,0xF4); // Set Watchdog Timer Value
outportb(IO_Port_Address+1,Time); // 0x00 to disable, max 0xFF
while(1)
{
Vue de la page 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 30 31

Commentaires sur ces manuels

Pas de commentaire