Appendix C: GPI/O Programming Guide
GPIO programming sample code
#define MEMORY_BASE_ADDRESS
#define NCT7904D_SLAVEADDRESS
#define SMBUS_BASE_ADDRESS
#define GPO7_HI
MmioWrite(MEMORY_BASE_ADDRESS+0x168, 0x00000001)
#define GPO7_LO
MmioWrite(MEMORY_BASE_ADDRESS+0x168, 0x00000000)
#define GPO8_HI
MmioWrite(MEMORY_BASE_ADDRESS+0x158, 0x00000001)
#define GPO8_LO
MmioWrite(MEMORY_BASE_ADDRESS+0x158, 0x00000000)
#define GPO9_HI
MmioWrite(MEMORY_BASE_ADDRESS+0x188, 0x00000001)
#define GPO9_LO
MmioWrite(MEMORY_BASE_ADDRESS+0x188, 0x00000000)
#define GPO10_HI
MmioWrite(MEMORY_BASE_ADDRESS+0x198, 0x00000001)
#define GPO10_LO
MmioWrite(MEMORY_BASE_ADDRESS+0x198, 0x00000000)
//SmbusWriteByte, Please refer to Smbus Write Byte Protocol
#define GPOC2_HI
SmbusWriteByte (0xEA, XXXX1XXXb)
#define GPOC2_LO
SmbusWriteByte (0xEA, XXXX0XXXb)
#define GPOC1_HI
SmbusWriteByte (0xEA, XXX1XXXXb)
#define GPOC1_LO
SmbusWriteByte (0xEA, XXX0XXXXb)
void main(void)
{
GPO7_HI;
GPO8_LO;
GPO9_HI;
GPO10_LO;
GPOC2_HI;
GPOC1_LO;
}
Copyright © 2017 NEXCOM International Co., Ltd. All Rights Reserved.
0xFED0E000
0x5A
0xE000
47
NIFE 103 User Manual
Need help?
Do you have a question about the NIFE 103 and is the answer not in the manual?