AAEON IMBA-Q77 User Manual

Page 116

Advertising
background image

I n d u s t r i a l M o t h e r b o a r d

I M B A - Q 7 7

Appendix E Digital Input & Output

E-5

************************************************************************************
#include <stdio.h>
#include <conio.h>

#define SIOIndex

0x2E //Modify for project support 2E/4E

#define SIOData

0x2F //Modify for project support 2F/4F

#define boolean AaeonDigitalInput(int byte LDN, int byte RegNum, int byte
BitNum);
#define void AaeonDigitalOutput(int byte LDN, int byte RegNum, int byte
BitNum, boolean Status);
************************************************************************************
Main(){

// Procedure : AaeonDigitalInput
// Input :
// (byte)LDN :

Logic Device Number Register

// (byte)RegNum : 0x00 ~ 0xFF
//

SuperIO register offset that you want to access

// (byte)BitNum : 0 ~ 7
//

Which bit in register that you want to access

// Output :
// (boolean)Status : When read Digital Input Status, it will return the result

of Pin

// Status.

boolean Status = AaeonDigitalInput(int byte LDN, int byte RegNum, int byte
BitNum);

// Procedure : AaeonDigitalOutput
// Input :
// (byte)LDN : Logic Device Number Register
// (byte)RegNum : 0x00 ~ 0xFF
//

SuperIO register offset that you want to access

// (byte)BitNum : 0 ~ 7
//

Which bit in register that you want to access

// (boolean)Status :

When write Digital Output Status, this value is

the Pin status
//

of Digital Output that you want.

Advertising