EasyManuals Logo

AMD MD740 User Manual

AMD MD740
62 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #59 background imageLoading...
Page #59 background image
APPENDIX
MB740 User’s Manual 55
D. Digital I/O Sample Code
File name: Main.CPP
//---------------------------------------------------------------------------
//
// 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 <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "ITE8705.H"
//---------------------------------------------------------------------------
void ClrKbBuf(void);
int main (int argc, char *argv[]);
void SetDioOutput(unsigned char);
unsigned char GetDioInput(void);
//---------------------------------------------------------------------------
int main (int argc, char *argv[])
{
if (Init_ITE8705() == 0)
{
printf("Can not detect ITE8705, program abort.\n");
return(1);
}
<!--[if !supportEmptyParas]--> <!--[endif]-->
printf("Current DIO input is 0%X\n", GetDioInput());
<!--[if !supportEmptyParas]--> <!--[endif]-->
printf("Set DIO output to high\n");
SetDioOutput(0x0F);
<!--[if !supportEmptyParas]--> <!--[endif]-->
printf("Set DIO output to low\n");
SetDioOutput(0x00);
<!--[if !supportEmptyParas]--> <!--[endif]-->
return 0;
}
//---------------------------------------------------------------------------
void SetDioOutput(unsigned char data)
{
Set_ITE8705_LD( 0x05); //switch to logic device 7
outportb(ITE8705_IO_PORT, ((data & 0x0F) << 4));
}
//---------------------------------------------------------------------------
unsigned char GetDioInput(void)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMD MD740 and is the answer not in the manual?

AMD MD740 Specifications

General IconGeneral
BrandAMD
ModelMD740
CategoryMotherboard
LanguageEnglish

Related product manuals