Specifications

smartModule Express SMX945 / The Special Function Interface (SFI)
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 differ for the various chipsets and BIOSes. Read about the
Registers definition in the user manual.
For example: To get temperature value on a board with the PIIX4 chipset, use "Regs.ah = 0xEC;" on a board with
the 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.
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 user software.
int GetChipID(void): an additional service function; 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;