Home

KT-API-V2-DLL KT-API-V2-DLL User Manual SW utility designed for

image

Contents

1. Arguments Status Pointer to receive status Return If the function succeeds the return value is se otherwise its se Error kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 140f 23 Function intClrintruderStatus void o Description This function clears the intruder status bit Arguments None Return If the function succeeds the return value is se OK otherwise its se Error Function intEnableWD void Description This function enables the watchdog timer The user must call SetWDTimer and SetWDTimerlnterval before calling this function to prevent immediately reboot Arguments None Return If the function succeeds the return value is se otherwise its se Error Function intDisableWD void Description This function disables the watchdog timer Any attempts to modify watchdog timers after calling this function will have no effect Arguments None Return If the function succeeds the return value is se OK otherwise its se Error Description This function set the watchdog timer interval The interval is multiplied with the WDTimer value and represents the time out period There are to selectable intervals listed in the ktapi h file SEC MIN Arguments VAL Timer interval Return If the function succeeds the return value
2. se Error Description The function return the capability of the GPIO pin Arguments Index GPIO Index number Value Pointer to an unsigned int that will return capability of the GPIO Return If the function succeeds the return value is se otherwise its se Error kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 130f 23 Function intSetFanSpeed unsigned char Speed 1 Description This function sets the fan speed in the interval between 0 127 where max speed is 127 Any attempts to write values above 127 will be ignored For some boards only 16 steps are possible so that any value 120 127 generates maximum speed 112 119 generates second most highest speed and so on Please notice that the values in the range 0 47 might generate a voltage with is to low to start the Fan Arguments Speed Fan speed value between 0 and 127 Return If the function succeeds the return value is se OK otherwise it s se Error Function int SelectFanTempTacChannel unsigned char Channel Description This function selects the hardware Fan Temp and Tachometer channel default is channel 0 Arguments Channel 0 CPU Fan Temperature 1 System Fan Temperature 2 Feature Connector Fan Temperature Return If the function succeeds the return value is se otherwise its se Error Function intStar
3. Description This function resolves the addressee for the named function Arguments Name Name of API function pFunction where to put function addressee Return If the function succeeds the return value is se OK otherwise it s _APl_se_ Error kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 11 of 23 Function int ReadHWMonitorltems pHWM Item Items Description This function read the HW monitor and return a structure pointer Arguments Items return pointer to the structure typedef struct HWM 1 ID float Value char Name HWM Item pHWM Item typedef enum _HWM_Last 0x0000 _HWM_VCORE 0x0001 _HWM_VCOREb 0x0002 _HWM_VCC2_5 0x0003 _HWM_VCC3 0x0004 _HWM_VCC5 0x0005 HWM V1220x0006 HWM SB320x0007 HWM V 1220x0008 _HWM_SB5 0x0009 _HWM_VBATT 0x000a HWM VCC1 220x000b HWM VCC1 820x000c _HWM_VIN 0x000d _HWM_VCC1_5 0x000e HWM CPU Tempz0x1001 HWM System Tempz0x1002 FC Tempz0x1003 HWM CPU Fanz0x2001 HWM System Fan z0x2002 HWM FC Fanz0x2003 HWM Type Mask 0xf000 HWM Type Voltage 0x0000 HWM Type Temperaturez0x1000 HWM Type Fanz0x2000 HWM ID Return If the function succeeds the return value is se otherwise its se Error Function int GetHWMonitorltem HWM IDID float Value Description This function look up the HWM 10 and return the
4. gt lt gt K gt K gt lt gt lt gt K gt K gt lt gt lt gt lt gt lt gt lt x gt lt gt lt gt lt gt lt gt K gt lt gt lt gt lt 5 gt K gt lt gt lt gt K gt lt gt K gt lt X lt gt lt gt lt gt lt gt lt x X gt lt gt lt gt lt gt lt gt lt x gt lt gt lt gt lt gt K gt lt gt lt gt lt OK gt lt gt lt gt K gt lt OK gt lt gt X lt gt lt gt lt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt Notes The SmBus are supporting the SmBus available on the Feature Connector only kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 50f23 The greyed API function is EOL and might be removed in future KT API V2 package 1 for backward compatibility can only access 8 GPIO The Utility can be used to implement applications in a Windows environment Please notice that the are also available in a source code based version for Linux and dos support Gkontron KT API V2 DLL The KT Monitor V2 for Windows can be used as a reference design in order to get a better overview of what is possi
5. X gt lt x gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt lt gt lt gt lt gt lt gt lt KT API GetFunction KT API Open x ReadBoardHeader ReadGPIO ReadHWMonitorltems gt lt gt lt gt lt x gt lt gt lt x gt lt gt lt gt lt x ReadMonitor SelectFanTempTacChannel SetBKLControl SetCIrGPIO x x x SetCPUThrottle SetFanMode SetFanSpeed SetFanTarget SetGPlOConfig SetGPIODir SetGPlOValue SetWDTimer SetWDTimerlnterval gt lt gt lt gt lt gt lt gt lt gt lt X lt gt lt gt lt gt lt gt lt x gt lt gt lt gt lt gt lt gt lt x SmBus_PorcessCall SmBus_ReadBlock SmBus_ReadByte SmBus_ReadBytes SmBus_ReadWord SmBus_RecvByte SmBus_SendByte KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 230f 23 SmBus_WriteBlock SmBus_WriteByte SmBus_WriteWord StartThermalCruise x x x Appendix A How to read the IIH IHH is Integrated Info Header from the BIOS of Kontron Technology SBC s contains board identification The IIH is implemented for KT Motherboards You ca
6. from a designated register The register is specified through the Command Code Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code ucpData Pointer to received data Return If the function succeeds the return value is se OK otherwise its se Error Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 17 of 23 eee i int SmBus_ReadWord unsigned char ucDevAddr unsigned char ucCommandCode unsigned short uspData This reads a word 16 bits from a device from a designated register The register is specified through the Command Code Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code uspData Pointer to received data Return If the function succeeds the return value is se otherwise it s Error a unsigned char ucpByteCnt unsigned char ucpDataBuf Description This command reads a block of upto 32 bytes from a device from a designated register that is specified through the Command code The amount of data is specified by the device in the ucpByteCnt The actual amount of data in device is returned in ucpByteCnt Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code ucpByteCnt In size of data buffer Out numbers bytes received
7. ucpDataBuf Pointer to data buffer Return If the function succeeds the return value is se OK otherwise it s se Error unsigned int uiByteCnt unsigned char ucpDataBuf Description This reads multi bytes from a device starting from a designated register The register is specified through the Command Code Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code uiByteCnt Numbers bytes received ucpDataBuf Pointer to data buffer Return If the function succeeds the return value is se otherwise it s se Error Description This is the reverse of RecvByte it sends a single byte to a device See Read Byte for more information Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code Return If the function succeeds the return value is se OK otherwise its se Error Int SmBus WriteByte unsigned char ucDevAddr unsigned char ucCommandCode unsigned char ucData Description This writes a single byte to a device to a designated register The register is specified through the Command code This is the opposite of the ReadByte command Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code ucData Data to send Return If the function succeeds the retu
8. PWM by setting the PWM frequency and duty cycle GetMac This function receives the MAC address of a specific NIC SetCPUThrottle This function set CPU throttle This function can be used to save power by slowing down the CPU speed ReadBoardHeader This function read the Inside Header Info from the Memory Area GetBoardName This function returns a pointer to a text containing the board name SmBus_RecvByte This reads a single byte from a device without specifying a device register SmBus_ReadByte This reads a single byte from a device from a designated register SmBus_ReadWord This reads a word 16 bits from a device from a designated register SmBus_ReadBlock This command reads a block of up to 32 bytes from a device SmBus_ReadBytes This reads multi bytes from a device starting from a designated register SmBus_SendByte This sends a single byte to a device without specifying a device register SmBus_WriteByte This writes a single byte to a device to a designated register SmBus_WriteWord This writes a word 16 bits to a device from a designated register SmBus_WriteBlock This command writes a block of up to 32 bytes to a device SmBus PorcessCall This command selects a device register through the Command code sends 16 bits of data to it and reads 16 bits of data in return GetRAIDStatusMessage This return status text of a RAID dri
9. sends 16 bits of data to it and reads 16 bits of data in return Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code uspData In Data to send Out Data received If the function succeeds the return value is se OK otherwise it s se Error Function int GetRAlDStatusMessage int Nr char Message Description This function receives the status message for a RAID drive Arguments Nr RAID drive number Message Pointer to a text string where the status message will be copied to The string must be at least 0x100 of length Return If the function succeeds the return value is se otherwise its se Error unsigned int GetHDDAttributes int DriveNo HDDDataBlock pHDDDataBlock unsigned int dwIDCount Description This function fills the structure array of S M A R T Attributes passed to the function DriveNo is the Physical drive number Arguments DriveNo Physical driver number pHDDDataBlock Pointer to HDDDataBlock blocks dwIDCount The number of structures passed to the function equals the number returned by the GetIDCount function Return If the function succeeds the return value is se OK otherwise it s se Error kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 19 of 23 Function unsigned int_GetIDCount unsigned char DriveNo 1 D
10. 0 32 KTGM45 mITX S N 00873097 File Test Fan Settings 5 9 Display CPU Fan Settings CPU Current Manual Watchdog Thermal Cruise Fan Speed Cruise Raid SMART Info System 40 2000 p Temperature System Current CPU Thermal Cruise Fan Speed Cruise H 40 4000 W Voltage FC a Current Manual n Thermal Cruise Fan Speed Cruise o 40 4000 s vss B 0 241 im Gkontron KT API V2 DLL KTD 00798 C 2 KT API V2 DLL package content The KT API V2 DLL package contains the following files In a ktapi h Setup exe Setup64 exe In 32 ktapi dll Ktapi sys In 64 ktapi dll Ktapi sys In source apiraid smart c apitest c apitestex c apiwd c In Embarcadero ktapi lib XE2 In ms 32 64 MS Visual 10 In monitor monitor exe Public User Manual include file for using the dill file Setup program for installing the API Date 2012 07 18 Setup program for installing the API on 64bit OS API 32bit dynamic library API 32bit system driver API 64bit dynamic library API 64bit system driver Sample program to dump RAID S M A R T information Sample program to read out the hardware monitor Sample program test other API functions Sample program using watchdog library for including the API into a Borland project Sample project for C Builder XE2 using source code from source library for including the API in
11. 45 KTHM65 ReadMonitor see note ReadHWMonitorltems GetHWMonitorltem SetCIrGPIO ReadGPIO SetGPlODir ReadGPlOEvent GetGPlOConfig SetGPlOConfig GetGPlOValue SetGPlOValue GetGPlOCap SetFanSpeed EnableWD DisableWD SetWDTimer SetCPUThrottle SetBKLControl ReadBoardHeader GetBoardName A W GetSerialNumber W GetPartNumber W SelectFanTempTacChannel GetlntruderStatus ClrintruderStatus StartThermalCruise GetMac SetFanTarget SetFanMode SmBus_RecvByte SmBus_ReadByte SmBus_ReadWord SmBus_ReadBlock SmBus_ReadBytes SmBus_SendByte SmBus_WriteByte SmBus_WriteWord SmBus_WriteBlock SmBus_PorcessCall lt gt lt X x Xx Xx Xx Xx zu nu u Fere zi mu zm ae Fere x x x x x KTUS15 gt lt gt lt gt lt gt lt gt lt Xxx Xxx gt lt gt lt gt lt Xxx X gt lt gt lt gt lt xx X gt lt gt lt gt lt gt lt gt lt X gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt XX gt lt gt lt OK x X gt lt gt lt gt lt gt lt x gt lt X gt lt gt lt gt lt x gt lt
12. C Fan Fan RPM via Feature Connector AUXFAN Type Mask Internal use Type Voltage Internal use Type Temperature Internal use Type Fan Internal use Gkontron KT API V2 DLL KTD 00798 C Date 2012 07 18 Public User Manual Page 210f23 KTUS15 _HWM_Name Note BIOS text if available Last Internal use VCORE VCOREb Core voltage b Core voltage Single Voltage Input VCORE VIN Vin board supply E CPU temperature CPU temperature System Temp System temperature System temperature Fan RPM Feature Connector AUXFAN Type_Fan Internal use Gkontron KT API V2 DLL KTD 00798 C Public User Manual 8 Examples Source Code Date 2012 07 18 Page 220f23 The following table specifies the different being used in the source code examples available in the KT API V2 DLL package CirintruderStatus Visual Basic VS 2010 DisableWD EnableWD GetBoardName A W GetGPlOCap GetGPlOConfig GetGPlOValue GetHDDAttributes GetHWMonitorltem lt x px x xx VC 2010 commandline x gt lt DDK 7600 16385 1 X 2 OK X x x x xx Embarcadero C Builder GetlDCount GetldentBlock GetlntruderStatus GetMac GetPartNumber A W GetRAIDStatusMessage GetSerialNumber A W KT API Close
13. Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 1 of 23 KT API V2 DLL User Manual SW utility designed for the following Motherboard families 886LCD M 986LCD M KT690 KTUS15 KT965 KTGM45 KTQ45 KTG41 KTHM65 KTQM67 KTHM76 KTQM77 KTQ67 KTQ77 Supported by WinXP Win7 32B 64B kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 20f23 Document revision history Revision Date By Comment Jul 18 2012 OLA Added support for KTQ67 77 KTQM67 77 and KTHM65 series boards Updated IHH New ReadGPlOEvent GetRAIDStatusMessage Nov 23 2010 OLA MLA GetHDDAttributes and GetlDCount GetldentBlock Added list of source code examples Added reference to KT Monitor V2 Dec 10 2009 OLA MLA Added info on ReadHWMonitorltems values and other minor details Nov 19 2009 OLA MLA Preliminary version Copyright Notice Copyright 2012 KONTRON Technology A S ALL RIGHTS RESERVED No part of this document may be reproduced or transmitted in any form or by any means electronically or mechanically for any purpose without the express written permission of KONTRON Technology A S Trademark Acknowledgement Brand and product names are trademarks or registered trademarks of their respective owners Disclaimer KONTRON Technology A S reserves the right to make changes without notice to any product including circuits and or software des
14. U speed and save power The selectable duty cycle intervals are listed in api h Arguments DUTY Duty cycle Return If the function succeeds the return value is se OK otherwise its se Error Function intReadBoardHeader void Buffer Description This function read the Integrated Info Header from the Memory Area The argument passed to the function must be a pointer to a structure of minimum 19 Bytes The more information on the returned data see appendix A for structure info Arguments Buffer Pointer to buffer to receive IIH Return If the function succeeds the return value is se otherwise its se Error Function Int GetBoardName char Name Description This function returns a pointer to a text containing the board name Arguments Name Pointer to a char pointer that will receive the BoardName Return If the function succeeds the return value is se otherwise its se Error Int GetBoardNameA char Name D This function copy text string containing the board name Name shut be 0x100 long Arguments Name Pointer to a char string that will receive the BoardName Return If the function succeeds the return value is se otherwise its se Error Function Int GetBoardNameW WCHAR Name O Description This function copy text string containing the board name Name shut be 0x100 long Argument
15. ar pointer that will receive the serial number Return If the function succeeds the return value is se OK otherwise its se Error Description This function copy text string containing the part number Serial number shut be 64 long Arguments Name Pointer to a char string that will receive the serial number Return If the function succeeds the return value is se OK otherwise its se Error Description This function copy text string containing the part number Serial number shut be 64 long Arguments Name Pointer to a wchar string that will receive the serial number Return If the function succeeds the return value is se OK otherwise its se Error Function int SmBus RecvByte unsigned char ucDevAddr unsigned char ucpData This reads a single byte from a device without specifying a device register Some devices are so simple that this interface is enough for others it is a shorthand if you want to read the same register as in the previous SMBus command Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucpData Pointer to received data Return If the function succeeds the return value is se otherwise it s se Error pend Int SmBus ReadByte unsigned char ucDevAddr unsigned char ucCommandCode unsigned char ucpData Description This reads a single byte from a device
16. ble to implement by using the KT API V2 package Monitor V0 00 KTAPI Verion 0 001 417 986LCD M mITX CPU 3971 RPM Systen 0 RPM Ext 0 RPM Temperature B cv 40 5 System 35 0 Ext 123 5 DevAddr 90 CommandCode 00 ByteCount 20 Data 70 SmBus_ReadBlock SmBus SendByte SmBus_WiiteBlack SmBus_FeadByte SmBus ReadBytes SmBusWiitefiyte SmBus_PorcessCall SmBus Readword SmBus_Writeword Info Monitor V0 02 KTAPI Version 1 000 1660 32 KTGM45 mITX S N 00873097 File Test Display Fan Settings Watchdog Raid SMART Info CPU System FC Raid S MA R T Info Temperature Raid Infomation E 0 N A 1 ces 2 B system 3 n S M A R T Information w Read Error Rate 200 Spin Up Time 159 Start Stop Count 100 Reallocated Sector Ct 200 Seek Error Rate 200 ower On Hours 97 E Spin Retry Count 100 Calibration Retry Count 100 Power_Cycle Count 100 Retract_Count 200 E ad Cycle Count 200 B Temperature Celsius 115 Reallocated Event 200 Current_Pending_Se 200 Offline Uncorrectable 200 Oo UDMA_CRC_Error_Count 200 Unknown Attribute 200 im Monitor 0 02 KTAPI Version 1 000 166
17. cribed or contained in this manual in order to improve design and or performance Specifications listed in this manual are subject to change without notice KONTRON Technology assumes no responsibility or liability for the use of the described product s conveys no license or title under any patent copyright or mask work rights to these products and makes no representations or warranties that these products are free from patent copyright or mask work right infringement unless otherwise specified Applications that are described in this manual are for illustration purposes only KONTRON Technology A S makes no representation or warranty that such application will be suitable for the specified use without further testing or modification Life Support Policy KONTRON Technology s PRODUCTS ARE NOT FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT EXPRESS WRITTEN APPROVAL OF THE GENERAL MANAGER OF KONTRON Technology A S As used herein 1 Life support devices or systems are devices or systems which a are intended for surgical implant into body or b support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labelling can be reasonably expected to result in significant injury to the user 2 Acritical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life suppo
18. escription This function returns the number of S M A R T Attributes supported by the selected drive This function should be used together with the GetHDDAttributes function Arguments DriveNo Physical driver number Return If the function succeeds the return value is se otherwise its se Error Function unsigned int GetldentBlock int Driveld IDentBlock IDentBlock Description This function fills the Identifier block structure of a physically drive see format Identifier structure in the ktapi h file Arguments Driveld Physical driver number IDentBlock Pointer to a IDentBlock where data will be stored Return If the function succeeds the return value is se otherwise its se Error Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 20 0 23 7 ReadHWMonitorltems description of values KT965 _HWM_Name BIOS text if available Last Internal use VCORE Core voltage VCORE VCOREb Core voltage b VCC2 5 2 5V VCC3 3 3V 3VCC VCC5 5V 5VIN 12 12V 12VIN SB3 Standby 3 3V VSB 12 12V 12VIN SB5 Standby 5V VBATT Battery voltage VBAT VCC1 2 1 2V 1 8 1 8V Core 1 8V VIN Single Voltage Input 1 5 1 5V Core 1 5V CPU Temp CPU temperature CPU temperature System Temp System temperature System temperature FC Temp Temperature via Feature Connector CPU Fan CPU Fan RPM CPUFANO System Fan System Fan RPM SYSFAN F
19. is se OK otherwise its se Error Description This function sets the watchdog timer An application must service this function and reload the timer to prevent reboot the number of units is between 0 255 Arguments Time Value used for the next timeout watchdog period Return If the function succeeds the return value is se OK otherwise it s se Error Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 150f 23 Function intSetBKLControlunsigned int Freq unsigned int Duty Description The duty cycle in value must be between 0 100 The Pwm frequency in Khz 1Khz 48Khz value must be in the range 1 48 Arguments Freq Frequency Duty Duty cycle Return If the function succeeds the return value is se OK otherwise it s se Error Function Int GetMac unsigned char nMac void Buffer Description This function receives the MAC address of a specified controller passed in nMac 1 1 2 2 3 3 The input buffer must be at least 6 bytes long Arguments nMac Ethernet controller number Buffer Buffer to receive the MAC address in Return If the function succeeds the return value is se OK otherwise it s se Error Function _ int SetCPUThrottle unsigned char DUTY Description This function set CPU throttle an application can call this function to slow down the CP
20. n use DMI Desktop Management Interface or API function Readboardheader Disclaimer KONTRON Technology A S reserves the right to make changes without notice Contents Magicscan 24h 49h 49h 48h Infosize Amount of info in bytes exclude header and this byte 40 886LCD M Flex 48 886LCD mITX 50 886LCD M ATX 60 786LCD mITX 90 986LCD M mITX 91 986LCD M Flex 92 986LCD M ATXP 93 986LCD M ATXE 94 KT965 Flex 95 KT965 ATXE 96 KT965 ATXP 98 KT690 mITX 100 KT780 ATX 104 KTUS15 mITX 108 KTG41 ATXU 110 KTGM45 mITX 112 KTGM45 Flex 114 KTGM45 ATXP Boardinfo 118 KTQ45 Flex 120 KTQ45 ATXE 124 KTQM67 mITX 125 KTQM67 Flex 126 KTQM67 ATX 128 KTQ67 Flex 129 KTQ67 ATXE 132 KTA55 pITX 133 KTA55 mITX 136 KTHM65 mITX 137 KTHM65 FLEX 138 KTHM65 ATX 140 KTQ77 FLEX 142 KTOM77 mITX 143 KTHM76 mITX 144 KTA70 mITX 148 20 150 KTT30 152 KTA75 mITX BlOSmijr BIOS MAJORVERSION in Hex value BlOSmnr BIOS MINORVERSION in Hex value Reserved N A S N S N in BCD P N P N in BCD
21. nction reads a GPIO pin located on the feature port SetGPIODir This function set the direction of the GPIO pins located on the feature port ReadGPlOEvent This function tells if there has been an event flag set on one or more of the GPIO s and then the flag s is cleared GetGPlOConfig This function return the GPIO configuration SetGPlOConfig This function set the GPIO configuration GetGPlOValue This function return the value of GPIO pin SetGPlOValue This function set the vault of the GPIO pin GetGPIOCap The function return the capability of the GPIO pin SetFanSpeed This function sets the fan speed SelectFanTempTacChannel This function selects the hardware Fan Temp and Tachometer channel StartThermalCruise This function enables Thermal Cruise Control the hardware monitor will automatically control the speed of CPU and System Fan SetFanTarget This function sets the Temperature Speed depending on the Mode selected SetFanMode This function sets the mode Thermal_Cruise or Fan_Speed_Cruise GetlntruderStatus This function returns the intruder status pin CirintruderStatus This function clears the intruder status bit EnableWD This function enables the watchdog timer DisableWD This function disables the watchdog timer SetWDTimer This function sets the watchdog timer SetBKLControl Set Backlight intensity via
22. on intReadGPlOEvent unsigned char Data Description This function return the GPIO configuration Arguments Data Pointer to an unsigned char event status Return If the function succeeds the return value is se otherwise its se Error Description This function read if any event has occurred sins last call Arguments Index GPIO Index number Config Pointer to an unsigned int variable that will return the configuration of the GPIO pin Return If the function succeeds the return value is se OK otherwise its se Error Description This function set the GPIO configuration Arguments Index GPIO Index number Config Configuration of the GPIO pin Return If the function succeeds the return value is se OK otherwise it s se Error Function int GetGPlOValue unsigned int Index unsigned int Value Description This function return the value of GPIO pin Arguments Index GPIO Index number Value Pointer to an unsigned int that will return value of the GPIO Return If the function succeeds the return value is se OK otherwise it s se Error Function int SetGPlOValue unsigned int Index unsigned int Value Description This function set the vault of the GPIO pin Arguments Index GPIO Index number Value value of the GPIO to set Retum If the function succeeds the return value is se OK otherwise it s
23. rn value is se OK otherwise it s se Error kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 180f 23 fae Int SmBus WriteWord unsigned char ucDevAddr unsigned char ucCommandCode unsigned short usData This is the opposite operation of the ReadWord command 16 bits of data is read from a device from a designated register that is specified through the Command code Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code usData Data to send Return If the function succeeds the return value is se OK otherwise its se Error char ucByieCmtunelgned char unsigned char ucByteCnt unsigned char ucpDataBuf Description The opposite of the Block Read command this writes upto 32 bytes to a device toa designated register that is specified through the Command code The amount of data is specified in the ucByteCnt Arguments ucDevAddr Addressee of the device in 8 bit includes R W bit witch shall be set to 0 ucCommandCode Command code ucByteCnt Numbers bytes send ucpDataBuf Pointer to data buffer If the function succeeds the return value is se OK otherwise it s se Error Int SmBus_PorcessCall unsigned char ucDevAddr unsigned char ucCommandCode unsigned short uspData Description This command selects a device register through the Command code
24. rt device or system or to affect its safety or effectiveness KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 30o0f 23 Table of contents LB recor ei Cor 4 2 KIsAPI V2 DLL p ckage Redi eee edi uai debis 7 Eel mE 8 NEM DPAUCUDIB P 8 Di e 9 API function detailed descriptions 10 7 ReadHWMonitorltems description of values 20 8 Examples Source Code o Pn esie neci ier eee ee i a eei cia Fede 22 Appendix How to read the i eere ie rre tti P Et pi eene PE nere F E Ere EH Va Eo 23 Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 4o0f 23 1 Introduction Using the API s makes it possible for OEM customers to design software application accessing onboard features in order to monitor and control different functionalities like Fan speed CPU temperature GPIO s Watchdog Monitoring voltages Backlight Intensity SMBus etc The KT API V2 is a software API utility designed for Kontron Motherboards The final application software based on these will only run correctly on Kontron Motherboards and only if the actual board type support all the used API s see table below API functions 886LCD M EOL 986LCD M KTGM
25. s Name Pointer to a wchar string that will receive the BoardName Return If the function succeeds the return value is se OK otherwise its se Error Function IntGetPartNumber char Number Description This function returns a pointer to a text containing the part number Arguments Name Pointer to a char pointer that will receive the part number Return If the function succeeds the return value is se otherwise it s se Error Gkontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 160f 23 Function IntGetPartNumber char Number Cd Description This function copy text string containing the part number Part number shut be 64 long Pointer to a char string that will receive the part number LO If the function succeeds the return value is se OK otherwise its se Error Function Int GetPartNumberW WCHAR Number Description This function copy text string containing the part number Part number shut be 64 long Arguments Name Pointer to a wchar string that will receive the part number Return If the function succeeds the return value is se otherwise its se Error Function Int GetSerialNumber char Number Description This function returns a pointer to a text containing the serial number Arguments Name Pointer to a ch
26. tThermalCruise VOID Description This function enables Thermal Cruise Control the hardware monitor will automatically control the speed of CPU and System Fan The target temperature of the CPU is set by using function SetFanTarget Arguments None Return If the function succeeds the return value is se OK otherwise it s se Error Function int SetFanTarget unsigned int uiStt Description This function sets the Target Temperature Speed depending on the Mode selected Mode selection can be set by calling function SetFanMode Note StartThermalCruise must be called prior to this call Arguments uiStt This is the temperature or speed target Return If the function succeeds the return value is se OK otherwise its se Error Function intSetFanMode UCHARucSfm Description This function set the Target Mode see modes available below Thermal Cruise Mode 01h Fan Speed Cruise Mode 02h Note StartThermalCruise must be called prior to this call Arguments ucSfm Fan mode Return If the function succeeds the return value is se otherwise its se Error Function intGetlntruderStatus unsigned int Status O Description This function returns the intruder status pin The status result is returned in Status Status 0x00000001 Intruder Open case detected Status 0x00000000 Intruder Open case not detected
27. to a 32bit MS project library for including the API into a 64bit MS project bat files that compile code from source dir Sample projects Sample program to check API functionality Page 70f23 kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 8of 23 3 Installation Execute the setup exe file this will install API 4 Using the DLL Include the lib in your project and include the ktapi h in the source For VB look the KTAPI vb in the sample project ms MS Visual 10 vb APItest1 G kontron KTD 00798 C 5 API overview Public User Manual KT API V2 DLL Date 2012 07 18 Page 9of 23 API Function Short form description KT_API_Open This function opens the device driver ktapi bin for hardware communication and must be called in order to use any other functions within this API KT API Close This function closes the device driver KT API GetFunction This function resolves the addressee for the named function ReadMonitor see note This function takes a HWMON structure and fills the structure with valid data ReadHWMonitorltems This function read the HW monitor and return a pointer to a struct GetHWMonitorltem This function return a single item from the struct used in ReadHWMonitorltems Call ReadHWMonitorltems to update the items SetCIrGPIO This function set or clears a GPIO pin located on the feature port ReadGPIO This fu
28. value Arguments look at ReadHWMonitorltems HWM ID pointer to the returned value Return If the function succeeds the return value is se otherwise it s se Error Function int SetCIrGPlO unsigned char GPIO int Description This function set or clears a GPIO pin located on the feature port Make sure to set pin direction before calling this function GPIO Mask of GPIO to set or clear SetClr 0 Clears 1 Sets kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 120f 23 Return If the function succeeds the return value is se otherwise it s Error Description This function reads a GPIO pin located on the feature port Make sure to set pin direction before calling this function Arguments GPIO Mask of GPIO to read Data Pointer to an unsigned char valued read from the GPIO Return If the function succeeds the return value is se otherwise its se Error Function intSetGPlODirunsigned char Description This function set the direction of the GPIO pins located on the feature port Make sure to call this function before calling ReadGPIO or SetCIrGPIO Arguments GPIO Mask of GPIO to set to output none set bits will be input Return If the function succeeds the return value is se otherwise its se Error Functi
29. ve GetHDDAttributes This return S M A R T attributes from a drive GetlDCount This return number of S M A R T attributes for drive GetldentBlock This return identifier block from a hard disk Notes APPs return API se OK logic 1 if the call succeeds otherwise it returns API se Error logic 0 The greyed API function is EOL and will be removed in future KT API V2 package kontron KT API V2 DLL KTD 00798 C Public User Manual Date 2012 07 18 Page 10 23 6 API function detailed descriptions Function intKT_API_Open intsf S O Description This function opens the device driver ktapi bin for hardware communication and must be called in order to use any other functions within this API Arguments sf Where to find ktapi bin sfNewest Check BIOS disk and internal for the newest version and load it sfBIOS Only load driver from BIOS sfDISK Only load driver from DISK sfinternal Use a internal embedded version of ktapi bin If the function succeeds the return value is se OK otherwise it s se Error Function int KT Close void Description This function closes the device driver After closing the driver no attempt to communicate with the driver will be accepted Arguments None Return If the function succeeds the return value is se OK otherwise it s se Error Function int KT API GetFunction char Name void pFunction

Download Pdf Manuals

image

Related Search

Related Contents

maintenance  LYNX GigE Vision Software User`s Manual  見る - ご利用の条件|取扱説明書|ケンウッド    新機能について(ソフトウェア V1.30)  Sécheurs d`air pour freins pneumatiques de remorque      LaCie eSATA Hub  Lucasey FSUL2720 flat panel wall mount  

Copyright © All rights reserved.
Failed to retrieve file