RUBY-D718VG2AR
Copyright © Portwell 2016 RUBY-D718VG2AR
User's Guide
25
5.2
GPIO Signal
GPIO Control Command Example (C Language)
#Define GPCR 0x2B//GPIO Coutrol Register, Bit7 = GPIO7, Bit6 = GPIO6, ..., 0: Output; 1: Input
#Define GPDR 0x2C//GPIO Data Register, Bit7 = GPIO7, Bit6 = GPIO6, ..., 0: Low; 1: High
VOID Write_EC_SRAM(UINT8 Offset,UINT8 Value){
IoWrite8(Offset,Value);
}
Byte Read_EC_SRAM(UINT8 Offset){
IoRead8(offset,Value);
return Value;
}
void GPIO()
{
int Temp;
// Get GPIO data
Temp = Read_EC_SRAM(GPDR);