Digital I/O Sample Program - Asus AAEON GENE-SKU6 User Manual

3.5” subcompact board
Hide thumbs Also See for AAEON GENE-SKU6:
Table of Contents

Advertisement

D.4

Digital I/O Sample Program

**************************************************************************
// SuperIO relative definition (Please reference to Table 2)
#define SIOIndex 0x2E
#define SIOData
#define DIOLDN
IOWriteByte(byte IOPort, byte Value);
IOReadByte(byte IOPort);
// DIO relative definition (Please reference to Table 3)
#define DirReg
#define InputPin
#define OutputPin
#define OutputReg
#define StatusReg
#define PinLow
#define PinHigh
#define Pin0Bit
#define Pin1Bit
#define Pin2Bit
#define Pin3Bit
#define Pin4Bit
#define Pin5Bit
#define Pin6Bit
#define Pin7Bit
**************************************************************************
**************************************************************************
VOID Main(){
Boolean PinStatus ;
// Procedure : AaeonReadPinStatus
// Input :
//
Example, Read Digital I/O Pin 3 status
// Output :
//
InputStatus :
//
0: Digital I/O Pin level is low
//
1: Digital I/O Pin level is High
PinStatus = AaeonReadPinStatus(Pin3Bit);
// Procedure : AaeonSetOutputLevel
Appendix D – Digital I/O Ports
0x2F
0x06
0xA0
// 0:input, 1: output
0x00
0x01
0xA1
// 0:low, 1: high
0xA2
// 0:low, 1: high
0x00
0x01
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
113

Advertisement

Table of Contents
loading

Table of Contents