beautypg.com

Pch 7791 – Acnodes PCH 7791 User Manual

Page 65

background image

PCH 7791

17 inch Atom Fanless Panel PC

© Copyright 2012 Acnodes, Inc.

All rights reserved. Product description and product specifications
are subject to change without notice. For latest product information,
please visit Acnodes’ web site at www.acnodes.com.

14628 Central Ave.

Chino, CA91710

Tel:909.597.7588, Fax:909.597.1939







// Super I/O index w ri te

# def ine

W RITE RE G(reg,val) {

\

outportb(INDE X P, reg);

\

outportb(DATA P, val);}

// Exit s uper I/O programming mode

# def ine EX ITPR G {

\

outportb(INDE X P, 0x AA );}

// Selec t logic devic e number

# def ine SE LETD EV (ldn) {

\

outportb(INDE X P, 7); \

outportb(DATA P, ldn); }

// Initialize th e GPIO port2

i nt InitGP 2() {

//Start the super I/O chip programming

E NTE RP RG

//S elect the lo gi cal devic e 9, GP2

S EL ETDE V(9)

//A ctivate G P1

W RITE RE G(0x30, (inportb(0x3 0)|0x2))

W RITE RE G(0xE6, 0 x0)

W RITE RE G(0xE4, 0 xFF)

//E xit the s uper I/O chip programm ing

E XITP RG

return 0;

}