Appendix
· 40 ·
EC3-1820V2NA
5. Appendix
5.1
GPIO Programming Guide
The GPIO function of this board uses ARM chip which is connected on SMBUS. The
selected chip is NUVOTON M054LDN. M054LDN controls GPIO input/output.
On the OS layer, connection with M054LDN is established based on SMBUS
communication. Users can set GPIO output level, and read GPIO input level.
M054LDN communicates with the motherboard via SMBUS. This motherboard is the
primary device, while M054LDN is secondary device. As for SMBUS
communication programming, users can refer to related files and specifications, such
as ICH7. Operation of SMBUS bottom-layer port function has already been realized,
and users can call provided API to meet their own requirements.
Following is the introduction to the port function. Please see the enclosed CD for
detailed program.
(1). SMBWriteByteEx(UCHAR ucSlaveAddress,
UCHAR ucCommand,
UCHAR ucData,
BOOLEAN bPecCheck
);
Function description: Write one byte (UCHAR) data on SMBUS
Parameter: ucSlaveAddress——from device address
ucCommand——write operation command
ucData——data
bPecCheck——false: Not to check; true: Check
Returned value:
Non-0 --- Function execution failed