EasyManua.ls Logo

Portwell RUBY-D716VG2AR - Page 31

Portwell RUBY-D716VG2AR
80 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
System Installation
RUBY-D716VG2AR User’s Manual 3-13
#define EC_PIN5_CTL_ADDR 0x1630 // E0
#define EC_PIN6_CTL_ADDR 0x1637 // E7
#define EC_PIN7_CTL_ADDR 0x1620 // C0
#define EC_PIN8_CTL_ADDR 0x1640 // G0
#define EC_Bit0 0x01
#define EC_Bit1 0x02
#define EC_Bit2 0x04
#define EC_Bit3 0x08
#define EC_Bit4 0x01
#define EC_Bit5 0x80
#define EC_Bit6 0x01
#define EC_Bit7 0x01
/* EC controll function */
static void EC_WriteByte (unsigned char index, unsigned char data)
{
outportb (EC_BASE, index);
delay(2);
outportb (EC_BASE+1, data);
delay(2);
}
/* Function to read value to SMFI via LPC */
static unsigned char EC_ReadByte (unsigned char index)
{
unsigned char tmp;
outportb (EC_BASE, index);
delay(2);
tmp = inportb (EC_BASE+1);
delay(2);
return tmp;
}
void EC_SetRamByte (int address, unsigned char data)
{
int addr_HighByte, addr_LowByte;
addr_HighByte = (address >> 8) & 0xFF;
addr_LowByte = address & 0xFF;
EC_WriteByte(EC_IO_BASE, 0x11);
EC_WriteByte(EC_IO_BASE+1, addr_HighByte);
EC_WriteByte(EC_IO_BASE, 0x10);
EC_WriteByte(EC_IO_BASE+1, addr_LowByte);

Related product manuals