EasyManua.ls Logo

Portwell RUBY-D716VG2AR - Page 28

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-10
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);
EC_WriteByte(EC_IO_BASE, 0x12);
EC_WriteByte(EC_IO_BASE+1, data);
}
unsigned char EC_GetRamByte (int address)
{
int addr_HighByte, addr_LowByte;
addr_HighByte = (address >> 8) & 0xFF;
addr_LowByte = address & 0xFF;
EC_WriteByte(EC_IO_BASE, 0x11);

Related product manuals