Kontron MSM800BEV V101 BIOS User Manual
Page 34
Geode LX800 / LX900
/ Special Peripherals, Configurations, Software
www.kontron.com
32
For example, the following code will initiate temperature measuring:
Registers Regs;
Regs.ah = 0xEC;
if(!Int15(&Regs)) //error in driver request
{
printf("Error reading temperature\n");
return;
}
//success - temperature value is in Regs.al
if(Regs.bl == 0)printf("\tTemperature = %d C\n",Regs.al);
//error - not valid value
else printf("\tError reading Temperature\n");
Note:
Input and output arguments of the Int15 function vary for different chipsets and BIOSes. Read the User
Manual on defining registers.
For example:
To get a temperature value on a board with a PIIX4 chipset, use "Regs.ah = 0xEC;" but on a board
with an ICH4 chipset, use "Regs.ax = 0x78EC;".
bool Open_Int15dl(void): the first function and must be called to create a link between the "DIGITAL-LOGIC INT15
functions emulator" driver and the user software. It returns true if the device was successfully opened; otherwise it
returns false.
void Close_Int15dl(void): the last function, it breaks the link between the driver and the user software.
int GetChipID(void): an additional service function; it returns the type of chipset (for PIIX4 = 4, for ICH4 = 5).
Registers Structure
This is used for exchanging information between the user program and the "Int15dl" driver.
typedef struct Registers {
union {
struct {
unsigned short ax;
unsigned short bx;
unsigned short cx;
unsigned short dx;
unsigned short bp;
unsigned short si;
unsigned short di;
unsigned short ds;
unsigned short es;
unsigned short flags;
};
struct {
unsigned char al;
unsigned char ah;
unsigned char bl;
unsigned char bh;
unsigned char cl;
unsigned char ch;
unsigned char dl;
unsigned char dh;
};
};
} TRegisters;