- 76 -
Appendix
- 76 -
C language Code
/*-----
Include Header Area -----*/
#include "math.h"
#include "stdio.h"
#include "dos.h"
/*-----
routing, sub-routing -----*/
void main()
{
outportb(0x2e, 0x87);
/* initial IO port twice */
outportb(0x2e, 0x87);
outportb(0x2e, 0x2a);
/* Select CR2A */
outportb(0x2e+1, 0xfc);
/* set CR2A bit7=1 as GPIO port 1*/
outportb(0x2e, 0x07);
/* point to logical device */
outportb(0x2e+1, 0x07); /* select logical device 7 */
outportb(0x2e, 0x30);
/* select CR30 */
outportb(0x2e+1, 0x01); /* set bit0=1, GPIO port 1 active */
outportb(0x2e, 0xf0);
/* select CRF0, GP I/O select */
outportb(0x2e+1, 0x00); /* bit7~bit0 0:output 1:input */
outportb(0x2e, 0xf1);
/* select CRF1, Data Register */
outportb(0x2e+1, 0xff);
/* set all GPIO pin output 1 */
outportb(0x2e, 0xf1);
/* select CRF1, Data Register */
outportb(0x2e+1, 0x00); /* set all GPIO pin output 0 */
outportb(0x2e, 0xAA);
/* stop program W83627HF, Exit */
}
Summary of Contents for ITX-i2705
Page 7: ... iii This page is intentionally left blank Index ...
Page 8: ... 1 Introduction 1 1 Chapter 1 Introduction Chapter 1 Introduction ...
Page 12: ... 5 Installation 5 2 Chapter 2 Installation Chapter 2 Installation ...
Page 44: ... 37 BIOS 37 3 Chapter 3 BIOS Chapter 3 BIOS ...
Page 73: ... 66 Appendix 66 Appendix Appendix ...
Page 84: ... 77 Appendix 77 This page is intentionally left blank ...