Acrosser AR-ES6050FLD-W Manuel d'utilisateur Page 35

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 45
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 34
Revision: 1.0
=======
//====================================================================
=======
// Language include files
//====================================================================
=======
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
//====================================================================
=======
// Normal procedure
//====================================================================
=======
void Show_Help();
//====================================================================
=======
// Main procedure
//====================================================================
=======
int main(int argc, char *argv[])
{
unsigned char IO_Port_Address=0x2E;
unsigned char Time;
unsigned char Temp;
if ( argc != 2 )
{ Show_Help(); return 1; }
clrscr();
Time=atoi(argv[1]);
// Set Watchdog
outportb(IO_Port_Address,0x87); // (EFER) Extended Functions Enable Register
outportb(IO_Port_Address,0x87);
outportb(IO_Port_Address,0x2D); // Point to Global Reg.
// Select Multi-Function pin, (Bit0=0 Watchdog Function)
outportb(IO_Port_Address+1,(inportb(IO_Port_Address+1)&0xFE));
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);
35
Vue de la page 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 44 45

Commentaires sur ces manuels

Pas de commentaire