Sample Code - VIA Technologies NAB-7400 User Manual

Hide thumbs Also See for NAB-7400:
Table of Contents

Advertisement

Appendix
S
C
AMPLE
ODE
This code and information is provided "as is" without warranty of any kind,
either expressed or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
#include <stdio.h>
#include <dos.h>
#include <inlines/pc.h>
//Sio area
#define SUPERIO_INDEX 0x4e
#define SUPERIO_DATA 0x4f
#define BANK_REG
#define CR20_REG
#define Fintek_ID
//Digital Input=GP10~13 ==> mapping to IN0~IN3
//Digital Output=GP14~17 ==> mapping to OUT0~OUT3
main(int argc, char *argv[])
{
int
int
char
unsigned char tmp, tmp1;
0x07
0x20
0x08 //Fintek Device ID CR21-20 = 0208h
i;
io_mode;
*ptr;
//This register indicate the device's ID
//0: read 1:write
64

Advertisement

Table of Contents
loading

Table of Contents