System Installation
WADE-8021 User’s Manual
3-1
GPIO Control Command Example (C Language)
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#define Superio2_Addr 0x2E
#define DEBUG 0
void enter_Superio2_CFG (void)
{
outportb (Superio2_Addr, 0x87);
delay (2);
outportb (Superio2_Addr, 0x01);
delay (2);
outportb (Superio2_Addr, 0x55);
delay (2);
outportb (Superio2_Addr, 0x55);
delay (2);
}
void exit_Superio2_CFG (void)
{
outportb(Superio2_Addr, 0xAA);
}
void Set_CFG2 (unsigned char Addr2,unsigned char Value2)
{
unsigned char d2;
outportb(Superio2_Addr, Addr2);
delay(2);
outportb(Superio 1, Value2);
delay(2);
}
unsigned char Get_CFG2 (unsigned char Addr2)
{
unsigned char d2;
outportb(Superio2_Addr, Addr2);
delay(2);
d2 = inportb(Superi1);
delay(2);