Home

User Manual iManager 2.0 Software API

image

Contents

1. 3 1 2 4 Easy System Upgrade sse 3 1 2 5 Increased 3 System Requirements 5 iManager Utility amp System 6 2 1 1 Hardware ete eti ee d RR Ne EROR 6 2 1 2 Operating SYStOMS 6 2 1 3 Software Requirements 6 amp Utility Installation 7 iManager Utility for Windows 5 8 Figure 3 1 iManager 2 0 Utility Main Window 8 Figure 3 2 Function List ithin the Utility sss 9 iManager amp Example Source 10 iManager 2 0 Utilities 11 VGA UOmEm 12 self M FERNER 13 PEec 14 watchdog ES 16 General Purpose lOs 2 0044400 0 18 19 Smart 2 c 21 Thermal Protection nennen 23 Hardware MOnitor ccccccceccesseeeeeceanseseeceeaeeseceeeceauaeseeeeeseanseeeeeeeanees 24 Board 0 0
2. 25 Programming Overview amp Reference 27 SAWS COMSS Pm 28 5 1 1 Status Code 28 32 JDefllle tese iind iion 32 5 2 2 Initialization 32 5 2 3 EAPI Information Functions 34 5 2 4 Backlight 37 5 2 b Storage Functions een 45 5 2 6 Functions for the I2C 2 44222 51 5 2 7 c 60 5 28 GPIO 65 iii iManager Software API User Manual Appendix A B 1 Appendix C C 1 Appendix D D 1 Appendix E 5 2 9 SmartFan 0 71 5 2 10 Thermal Protection Functions eec 74 5 2 11 SMBus 040000 1 77 Specification Version Number Format 89 Specification Version Number 90 General Version Number Format 91 General Version Number 92 OS Specific Requirements 93 WINDOWS 255 94 C 1 1 DLL Naming 4 0
3. event type Throttle supports specific Intel processors only iManager Software API User Manual 4 9 Hardware Monitor The Hardware Monitor shows you all system important features on one page H WMonitor Sensor Value Voltage CMOS Battery 2 89 SVSB 5 136 12 11 84 Temperature fg cpu 54 Fan Speed CPU 2725 System 0 Function intro Get various information in value or text format from the hardware platform The hardware monitor contains three features voltage temperature and fan speed These items are important to the operation of the system because when errors hap pen they may cause permanent damage to the PC The values will be always up to date Additional it will keep track of lower and upper limits of all the values The limits are calculated by the software during run time they do not include any other drops or peaks which occur when the system starts or the software is not running iManager Software API User Manual 24 Minimum 2 89 5 136 11 84 43 2467 Maximum 2 89 5 142 11 93 57 2945 Unit lt RPM RPM 4 10 Board Information iManager can gather and record system information for users to manage their devices L Information Board Manufacturer Name Advantech Board Name SOM 5890 Serial Number 000001 Board BIOS Revision x009 Platform Type COMExpress Board Platform Specification Revision 2 0 Boot Counter epit Running Time mete
4. Success EAPI STATUS SUCCESS iManager Software API User Manual 84 5 2 11 11SusiSMBusScanDevice SusiECSMBusScanDevice EC_API ULONG EAPI_CALLTYPE SusiSMBusScanDevice UCHAR bAddr_7 Description Scan if the address is taken by one of the slave devices currently connected to the SMBus Parameters bAddr_7 Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 85 iManager Software API User Manual 5 2 11 12SusiSMBusWriteBlock SusiECSMBusWriteBlock EC_API ULONG EAPI_CALLTYPE SusiSMBusWriteBlock UCHAR UCHAR bReg UCHAR Result UCHAR ByteCount Description Write multi data to the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to write data to Result Pointer to a byte array in which the function writes the block data ByteCount Specifies the number of bytes to be read Return Status Code Condition Return Value Lib
5. Function Demo Demo 1 Read a fan speed value 1 Select the reference fan target in the list Ex CPU System and so on 2 fan speed value will be shown Demo 2 Fan speed control Off 1 From Mode list select OFF 2 Click the Set button The fan will be disabled immediately 21 iManager Software API User Manual Demo 3 Fan speed control Full 1 From Mode list select Full 2 Click Set button The fan will operate at full speed Demo 4 Fan speed control Manual 1 From Mode list select Manual 2 Fill in the PWM value Ex 50 in text box 3 Click Set button The fan will operate at the designed speed Demo 5 Fan speed control Auto The fan speed can be set according to change of the CPU temperature 1 From Mode list select Auto 2 Choose PWM or RPM options in OpMode list 3 Fill in temperature value of Low Limit and High limit Ex Low Limit 65 High Limit 80 4 Setting the fan speed in both PWM and RPM mode Ex select the RPM Mode Low limit fan speed 1800 RPM High limit fan speed 4000 RPM 5 Press Set button then the device fan will dynamic amp self control automatically according to the state of CPU temperature Note fan speed range depends on the fan and some fans don t report the speed status Please refer to the spec of the selected fan and adjust EJ the range to suit check the details Note Therma
6. Offset Type W Set Read Write Number W Key in input data maximum 32 bytes W Click Write to write the data refer to Write Num W Click Read to read the data refer to Read Demo 4 Read write block Continuous Append the Block read write to the data on device after specific offset flag continuously WB Set Offset Type Set Read Write Number Key in input data Click Write to write the data refer to Write Num Click Read to read the data refer to Read The Frequency refers to the Frequency of the 2 Bus all values in kHz Note tyou want to change the frequency of the Bus make sure ALL your I2C devices support the faster speed otherwise don t change it Default JE is 100 kHz 15 iManager Software API User Manual 4 4 Watchdog Timer In general a watchdog timer is a function that performs a specific operation after a certain period of time when something goes wrong with the system A watchdog timer can be programmed to restart the system after a certain time period when a program or computer fails to respond Since many customers like to program different responses to different events Advan tech has designed an advanced watchdog which consists of both a single stage and a multi stage timer WatchDog Configure Event Delay ms f IRQ Event Timeout ms 0 SMI SCI Warm reset Reset Timeout ms 0
7. iManager 2 0 Software API AD ANTECH Enabling an Intelligent Planet Copyright This document is copyright 2011 by Advantech Co Ltd and PICMG All rights reserved Advantech Co Ltd Reserves the right to make improvements to the prod ucts described in this manual at any time Specifications are subject to change with out notice No part of this manual may be reproduced copied translated or transmitted in any form or by any means without prior written permission of Advantech Co Ltd Infor mation provided in this manual is intended to be accurate and reliable However Advantech Co Ltd assumes no responsibility for its use or for any infringements upon the rights of third parties which may result from its use All the trademarks of products and companies mentioned in this document belong to their respective owners Copyright 2011 Advantech Co Ltd All Rights Reserved Copyright 2009 PICMG All rights reserved Part No 200IMGR201 Edition 1 Printed in Taiwan February 2012 iManager Software API User Manual ii Contents Chapter 1 rere Chapter 2 2 1 Chapter 3 3 1 3 2 Chapter 4 Chapter 5 5 1 5 2 Introduction ee 1 Intelligent Management for Embedded 2 II M mE 2 1 2 1 Simplify Integration 2 40440 3 12 2 Enhance Reliability ete t teet 3 1 2 3 Secure the
8. ULONG Id Name Id char pBuffer Destination pBuffer ULONG pBufLen pBuffer Length Description Text information about the hardware platform Parameters Id Selects the Get String Sub function Id Id Description Example EAPI_ID_BOARD_MANUFACTURER_STR Board Manufacturer Name Advantech EAPI_ID_BOARD_NAME_STR Board Name SOM 5890 EAPI_ID_BOARD_SERIAL_STR Serial Number 0000001 EAPI_ID_BOARD_BIOS_REVISION_STR Board BIOS Revision X001 ID BOARD PLATFORM STR 522 Platform GOMExpress pBuffer Pointer to a buffer that receives the value s data This parameter can be NULL ifthe data is not required pBufLen Pointer to a variable that specifies the size in bytes of the buffer pointed to by the pBuffer parameter When the function returns this variable contains the size of the data copied to pBuffer including the terminating null character Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED pBufLen NULL EAPI STATUS INVALID PARAMETER pBufLen amp amp pBuffer NULL EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED Success EAPI_STATUS_SUCCESS iManager Software API User Manual 34 5 2 3 2 EApiBoardGetValue EC_API ULONG EAPI_CALLTYPE EApiBoardGetValue ULONG Id ULONG pValue Description Value Id Return Value Information about the hardware platform
9. 1 94 C 1 2 Version Resource Information 6 4 400 22 94 Linux Unix Shared Library Naming Convento nre eoo orar aperui ranis 95 Linux Unix Shared Library Naming Convention 96 0 1 1 ELF a out Format Shared Libraries 96 EAPI ID Definition 99 iManager Software API User Manual iv Chapter 1 Introduction 1 1 Intelligent Management for Embedded Platform Advantech s new platforms come equipped with iManager a micro controller that pro vides embedded features for system integrators Embedded features have been moved from the OS BIOS level to the board level to increase reliability and simplify integration runs whether the operating system is running or not it can count the boot times and running hours of the device monitor device health and provide an advanced watchdog to handle errors just as they happen iManager also comes with a secure amp encrypted EEPROM for storing important security key or other customer define information All the embedded functions are configured through API or by a DEMO utility Advantech is happy to provide its cus tomers with the release of this suite of software APIs Application Programming Inter faces These offer not only the underlying drivers required but also a rich set of userfriendly intelligent and integrated interfaces whi
10. 2 LVDS 2 Storage define EAPI ID STORAGE STD Thermal Protection define EAPI ID THERMAL PROTECTION 0 define EAPI ID THERMAL PROTECTION 1 define EAPI ID THERMAL PROTECTION 2 define EAPI ID THERMAL PROTECTION 3 EAPI ID 101 0x0002101C 0x00022000 0x00022001 0x00022002 0x00000000 0x00000001 0x00000002 0x0000000F 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00010000 0x00010001 0x00000000 0x00000001 0x00000002 0x00000000 0x00000000 0x00000001 0x00000002 0x00000003 iManager Software API User Manual AD ANTECH Enabling an Intelligent Planet www advantech com Please verify specifications before quoting This guide is intended for reference purposes only All product specifications are subject to change without notice No part of this publication may be reproduced in any form or by any means electronic photocopying recording or otherwise without prior written permis sion of the publisher All brand and product names are trademarks or registered trademarks of their respective companies Advantech Co Ltd 2011
11. Cold reset Demo Case 1 Application monitoring and self recovery Case 2 Multi Level Watchdog Timer DEMO Start Trigger Stop Option intro Delay Time Idle time after platform power and before watchdog timer is enabled Event Timeout If EC does not receive the trigger within this value of time out the watchdog will enter the 1st stage event Event IRQ warm reset cold reset Reset Timeout If EC does not receive the trigger within this value of time out the watchdog will enter the 2nd stage event forced warm reset iManager Software API User Manual 16 There are 2 Demo examples in the Watchdog utility no matter which you select you have to set timeouts for possible error scenarios Case 1 DEMO Application amp OS hang off and self recover Scenario Clicking the Start button launches an application that keeps sending the trig ger to iManager then click App Crash in the popup window to make it crash at once The application will stop sending the trigger event to EC after 1st stage Event Time out EC will send an IRQ event to terminate and recover itself and the app will back to normal and keep sending the trigger to EC if you click the BSOD button both application amp OS will crash immediately the app cannot send the trigger so the 1st stage event will be ignored and after 2nd stage Reset Time out it will trigger a warm reset to restart the platform Case 2 DEMO Multi stage
12. Driver and Advantech EC Driver after the installation is successful 3 2 iManager amp Example Source Code The iManager API is easy to install To use the iManager API just copy the following files to your application folder There is no need to do any formal installation To make your life easier we provide the C sample code of how to use the API library which will facilitate development of your own programs The provided files are Windows 1 Resource API EAPI_1 dll iManager dynamic link library 2 Resource API EAPI_1 lib iManager static library 3 Resource API REL_EC_API h iManager dynamic link library header 4 Resource API Define h Header file definitions ol SamplePade iManager example source code C SampleCode zip Linux 1 libEApi so iManager library file for Linux OS 2 REL_EC_API h iManager dynamic link library header 3 Define h iManager header and definitions iManager Software API User Manual 10 Chapter A iManager 2 0 Utilities 4 1 iManager 2 0 Utilities are plug ins for Advantech Embedded Software Suite for Windows They can be used to monitor control the entire system and help the developer to test iManager s features By default the Embedded Software Suite will install with pre installed iManager functions Functions supported in the Utility are VGA Enable the support of Low Level Backlight amp Brightness control ag Brightness Control
13. EApiWDogStart ULONG EAPI_CALLTYPE EApiWDogStart ULONG delay Delay in msec ULONG EventTimeout Timeout in msec ULONG ResetTimeout Reset in msec Description Start the watchdog timer and set the parameters To adjust the parameters the watchdog must be stopped via EApiWDogStop and then EApiWDogStart must be called again with the new values If the hardware implementation of the watchdog timer does not allow a setting at the exact time selected the EAPI selects the next possible longer timing Parameters delay Initial delay for the watchdog timer in milliseconds The first trigger must happen within delay EventTimeout milliseconds of calling EApiWDogStart EventTimeout Watchdog timeout interval in milliseconds to trigger an event ResetTimeout Watchdog timeout interval in milliseconds to trigger a reset Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Unsupported EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 62 5 2 7 3 EApiWDogTrigger 5 2 7 4 EC_API ULONG EAPI_CALLTYPE EApiWDogTrigger void Description Trigger the watchdog timer Parameters None Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Not Started EAPI_STATUS_ERROR Success EAPI ST
14. SusiECSMBusWriteByte EC_API ULONG EAPI_CALLTYPE SusiSMBusWriteByte UCHAR bAddr UCHAR bReg UCHAR bData Description Write a byte of data to the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to read data from bData Specifies the byte data to be written Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller by iManager or southbridge EAPI_STATUS_ERROR Success STATUS SUCCESS iManager Software API User Manual 80 5 2 11 6 SusiSMBusWriteWord SusiECSMBusWriteWord EC_API ULONG EAPI_CALLTYPE SusiSMBusWriteWord UCHAR bAddr UCHAR bReg USHORT wData Description Write a word 2 bytes of data to the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to write data to wData Specifies the word data to be written Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by
15. pWBuffer Write Data pBuffer ULONG WriteBCnt Number of Bytes to write void pRBuffer Read Data pBuffer ULONG RBufLen Data pBuffer Length ULONG ReadBCnt Number of Bytes to Read Description Universal function for read and write operations to the 12 bus Parameters Id See 12 Bus Ids Addr First Byte of I C Device Address pWBuffer Pointer to a buffer containing the data to be transferred This parameter can be NULL ifthe data is not required WriteBCnt Size in bytes of the information pointed to by the pWBuffer parameter plus 1 If pWBuffer is NULL this must be zero or one pRBuffer Pointer to a buffer that receives the read data This parameter can be NULL ifthe data is not required RBufLen Size in bytes of the buffer pointed to by the pRBuffer parameter If pRBuffer is NULL this must be zero ReadBCnt Size in bytes to be read to pRBuffer plus 1 If pRBuffer is NULL this must be zero or one Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED WriteBCnt gt 1 amp amp pWBuffer NULL EAPI_STATUS_INVALID_PARAMETER ReadBCnt gt 1 amp amp pRBuffer NULL EAPI_STATUS_INVALID_PARAMETER ReadBCnt gt 1 amp amp RBufLen 0 EAPI STATUS INVALID PARAMETER WriteBCnt 0 amp amp ReadBCnt 0 STATUS INVALID PARAMETER unknown Id EAPI STATUS UNSUPPORTED EC command fail EAPI STATUS ERROR Su
16. watchdog timer level testing Scenario Click the Start button the watchdog delay timeout will start counting down to zero then enter into the 2nd stage event timeout and start counting down when the counter stops at zero the IRQ event we ve designed will be triggered and a message box will appear At this moment you may click the Trigger but ton manually to send the trigger for resetting the timer If you stop clicking the Trigger button after the counter has counted down to zero then it will auto matically enter the last stage a warm reboot of the platform Note The SCI SMI event depends on the BIOS setting the event is warm E reboot signal by default JE Note Valid event types will change for different platforms due to hardware lim itations Please reference the hardware platform user manual to get EI detailed information Note Make sure you uncheck the option automatically restart in Advanced System Properties of Windows OS for testing CASE 1 Bsop DEMO Note Warm reset Sends a hardware reset signal without turning off power E 1 to the platform Cold reset Sends power down signal to platform and then sends a power up signal to boot up the machine e Trigger has no effect on delay timeout When trigger is submitted while counting in either event timeout or reset timeout stage the timeout flag will be reset to beginning of event timeout 17 iManager S
17. 00 2 1 iManager Software API User Manual 90 Appendix B General Version Number Format B 1 General Version Number Format Definition Bits Description 31 24 Major Version 23 16 Minor Version 15 0 Build Number Example Hex Interpreted 0x03040010 3 4 16 0x01100100 1 16 256 0x02010001 2 1 1 iManager Software API User Manual 92 Appendix C OS Specific Requirements C 1 Windows C 1 1 DLL Naming Convention EAPI X dll X represents the EAPI Specification Version Number Example EAPI 1 adll C 1 2 Version Resource Information Problem Due to the nature of the EAPI DLLs in Microsoft Windows it may not be possible to distinguish one manufacturer s DLL from another Although it would possible to do this using a tool that uses the API it may not be possible to load the DLL due to missing dependencies Solution The solution is to require that Version Resource Information be present for every EAPI DLL It is then easy to check Manufacturer and versions in the Windows Explorer Properties window iManager Software API User Manual 94 Linux Unix Shared Library Naming Convention D 1 D 1 1 D 1 1 1 Linux Unix Shared Library Naming Convention Problem Due to the nature of ELF Shared Libraries in Linux UNIX it may not be possible to distinguish one manufacturer s DLL from another Although it would possible to do this using a tool that uses the API it may
18. ALID_PARAMETER dwLen gt EEPROM_SECURE_KEY_SIZE EAPI_STATUS_INVALID_PARAMETER EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 50 5 2 6 5 2 6 1 5 2 6 2 Functions for the IC Bus Set of function to access the 2 bus Common Parameters I2C Bus Ids The EAPI specification currently defines three 12 buses for COM Express Id Description EAPI_ID_l2C_EXTERNAL Baseboard I2C Interface EAPI ID 12 LVDS 1 LVDS EDP 1 Interface EAPI ID l2C LVDS 2 LVDS EDP 2 Interface Eapil2CGetBusCap EC API ULONG EAPI CALLTYPE EApil2CGetBusCap ULONG 10 2C Bus Id ULONG Max Block Length Supported on this interface Description Returns the capabilities of the selected 2 bus Parameters See 12 Bus 106 Size bytes Pointer to buffer that receives the maximum transfer block length for the given interface Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pMaxBlkLen NULL EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED Success EAPI_STATUS_SUCCESS 51 iManager Software API User Manual 5 2 6 3 Eapil2CWriteReadRaw EC_API ULONG EAPI_CALLTYPE EApil2CWriteReadRaw ULONG ld 12C Bus ld ULONG Addr Encoded 7Bit I2C Device Address void
19. ATUS SUCCESS EApiWDogStop EC API ULONG EAPI CALLTYPE EApiWDogStop void Description Stops the operation of the watchdog timer Parameters None Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 63 iManager Software API User Manual 5 2 7 5 EApiWDogSetEventType EC_API ULONG EAPI_CALLTYPE EApiWDogSetEventType ULONG EventType Description To select one kind of event type and set it s timeout the event type contains delay IRQ SCI SMI Shutdown and Reset Parameters EventType Event Type Value SUSI WDOG EVENT DLY SUSI WDOG EVENT SUSI WDOG EVENT SCI SUSI WDOG EVENT shutdown SUSI WDOG EVENT RST 2jC0 mnm o SUSI WDOG EVENT NMI Reserved Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED EventType SUSI WDOG EVENT DLY amp amp EventType SUSI WDOG EVENT IRQ amp amp EventType SUSI WDOG EVENT SCI amp amp EventType SUSI WDOG EVENT BTN amp amp EventType SUSI WDOG EVENT RST amp amp EventType SUSI WDOG EVENT NMI EAPI STATUS INVALID PARAMETER Success EAPI STATUS SUCCESS iManager Software API User Manual 64 5 2 7 6 SetCallback 5 2 8 5 2 8 1 EC_API VOID EAPI_CALLTYPE SetCallback SUSI CALLBACK EVENT IN
20. Device Attribute Local Flat Panel 1 Frequency Hz 25000 Set Local Flat Panel 2 Local Flat Panel 3 Polarity Invert No Yes Set Backlight Control OoN OFF Auto ON ms 9999 0 9999 Brightness Control By Preset 5 2 0 5 9 Brightness Level Brightness Control By PWM Brightness Value 0 100 60 Set Option intro Device Select panel target multiple outputs supported Attribute W Frequency Hz Set the output frequency of the Inverter m Polarity Invert Set whether or not to change polarity of Inverter PWM signal Backlight control Set On or Off press set button to apply auto ON is a software method to prevent display loss for this demo utility only Brightness control by ACPI preset Switch to specific level of ACPI brightness table Brightness control by PWM Output brightness in PWM mode Note Frequency option will be in effect after change some specific situa N tions testing with oscilloscope to determine actual frequency status is E strongly recommended iManager Software API User Manual 12 4 2 Storage Access storage information and read write data to the selected user data area Lock Down EEPROM The total size of OEM EEPROM area is 64 bytes Developers can use this area to store their own data Lj Storage Information Area Count 1 Select Area 2 Standard Storage Area Area Size bytes 64 Other Read Write Data Byte Offset DxD 0x3F 0 00 Writ
21. EMP2 define EAPI ID HWMON SYSTEM TEMP2 define EAPI ID HWMON CPU define EAPI ID HWMON CHIPSET TEMPS define EAPI ID HWMON SYSTEM TEMPS VOLTAGE define EAPI ID HWMON VOLTAGE VCORE define EAPI ID HWMON VOLTAGE 2V5 define EAPI ID HWMON VOLTAGE 3V3 define EAPI ID HWMON VOLTAGE VBAT define EAPI ID HWMON VOLTAGE 5V define EAPI ID HWMON VOLTAGE 5VSB iManager Software API User Manual 100 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00010000 0x00010001 0x00010002 0x00020000 0x00020001 0x00020002 0x00020010 0x00020011 0x00020012 0x00020020 0x00020021 0x00020022 0x00020030 0x00020031 0x00020032 0x00021004 0x00021008 0x0002100C 0x00021010 0x00021014 0x00021018 define EAPI ID HWMON VOLTAGE 12V Fan define EAPI ID HWMON FAN CPU define EAPI ID HWMON FAN SYSTEM define EAPI ID HWMON FAN THIRD Backlight define EAPI ID BACKLIGHT 1 define EAPI ID BACKLIGHT 2 define EAPI ID BACKLIGHT 3 define EAPI ID BACKLIGHT BY PCH GPIO ID define EAPI_GPIO_IDO define EAPI_GPIO_ID1 define EAPI_GPIO_ID2 define EAPI_GPIO_ID3 define EAPI_GPIO_ID4 define EAPI_GPIO_ID5 define EAPI_GPIO_ID6 define EAPI_GPIO_ID7 define EAPI ID GPIO BANKOO define EAPI ID GPIO BANKO1 define EAPI ID GPIO BANKO2v 0x00010002 C Bus define EAPI ID 2 EXTERNAL define EAPI ID I2C LVDS 1 define EAPI ID
22. I STATUS INVALID PARAMETER EC command fail EAPI STATUS ERROR Success EAPI STATUS SUCCESS 73 iManager Software API User Manual 5 2 10 Thermal Protection Functions 5 2 10 1 Type define typedef struct THERMALPROTECTNO ULONG dw source Setting thermal source code here can make iManager use this ACPI source to check tem perature ULONG dw event type This byte can set up a thermal protect event 0x00 is Shutdown 0x01 is Throttle 0x02 is Power off and 0x08 is No event ULONG dw send event temperature 07120 When thermal source goes over this value iManager will send event according Event Type There are also some special values to compatible original ACPI These can make iManager use ACPI ram as Event temperature ULONG dw clear event temperature 07120 When thermal source goes below this value and Event is sent iManager will clear event according Event Type THERMALPROTECTNO PTHERMALPROTECTNO Typedef struct _SUSITHERMALCONFIG THERMALPROTECTNO protect number 4 There are 4 sets of thermal protects SUSITHERMALCONFIG PSUSITHERMALCONFIG iManager Software API User Manual 74 5 2 10 2 SusiEC_ThermalProtectionGetConfigStruct EC_API ULONG EAPI_CALLTYPE SusiEC_ThermalProtectionGetConfigStruct ULONG Id SUSITHERMALCONFIG pConfig Description Get Thermal Protection Setting Parameters Id Description EAPI ID THERMAL
23. NG plnputs Supported GPIO Input Bit Mask ULONG pOutputs Supported GPIO Output Bit Mask Description Reads the capabilities of the current GPIO implementation from the selected GPIO interface The ports where both input and output bit masks are 1 are GPIOs The direction of this ports can be configured by EApiGPIOSetDirection Parameters Id See GPIO lds 5 Pointer to a buffer that receives the bit mask of the supported inputs pOutputs Pointer to a buffer that receives the bit mask of the supported outputs Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED plnputs NULL amp amp pOutputs NULL EAPI_STATUS_INVALID_PARAMETER Unsupported ID EAPI_STATUS_UNSUPPORTED Not Started EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 66 5 2 8 3 EApiGPlOGetDirection EC_API ULONG EAPI_CALLTYPE EApiGPIOGetDirection ULONG ld GPIO Id ULONG Bitmask Bit mask of Affected Bits ULONG Current Direction Description Reads the current configuration of the selected GPIO ports Parameters Id See GPIO Ids Bitmask Bit mask pDirection Pointer to a buffer that receives the direction of the selected GPIO ports Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Bitmask 0 EAPI_STATUS_IN
24. PPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 43 iManager Software API User Manual 5 2 4 9 EApiVgaSetBacklightLevel EC_API ULONG EAPI_CALLTYPE EApiVgaSetBacklightLevel ULONG ld Backlight Id ULONG Level Backlight Level Description Sets the brightness level of the selected flat panel display Parameters Id See Backlight Ids Level Backlight Brightness level The value is from 0 to 9 Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Level gt EAPI_BACKLIGHT_SET_LEVELEST EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 44 5 2 5 5 2 5 1 5 2 5 2 Storage Functions The EAPI defines one user storage area with a minimal size of 64 Byte Common Parameters Storage Ids The EAPI only defines one user storage area Additional vendor specific IDs are possible Id Description EAPI ID STORAGE STD Standard Storage Area EApiStorageCap EC API ULONG EAPI CALLTYPE EApiStorageCap ULONG ld Storage Area Id ULONG pStorageSize Total ULONG pBlockLength Write Block Length Description Get the capabilities of the selected storage area Parameters Id See Storage 195 pStorageSize Pointer to a buffer that receives storage area size This para
25. PROTECTION 0 The first thermal protect area EAPI ID THERMAL PROTECTION 1 The second thermal protect area EAPI ID THERMAL PROTECTION 2 The third thermal protect area EAPI ID THERMAL PROTECTION 3 The fourth thermal protect area pConfig A data package for thermal protect see SUSITHERMALCOMFIG structure Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED unknown Id EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS 75 iManager Software API User Manual 5 2 10 3 SusiEC_ThermalProtectionSetConfigStruct EC_API ULONG EAPI_CALLTYPE SusiEC_ThermalProtectionSetConfigStruct ULONG Id SUSITHERMALCONFIG pConfig Description Set Thermal Protection configuration Parameters Description EAPI ID THERMAL PROTECTION 0 The first thermal protect area EAPI ID THERMAL PROTECTION 1 The second thermal protect area ID THERMAL PROTECTION 2 The third thermal protect area ID THERMAL PROTECTION The fourth thermal protect area pConfig A data package for thermal protection see SUSITHERMALCONFIG structure Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED unknown Id EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 76 5 2 11 SMBus Fun
26. Probe SMBus Probe initiates auto detect of all connected SMBus devices by using Quick Protocol It will show all occupied addresses in the Result Box This function is specially pro vided for developers and engineers who need a fast overview of which addresses are free and which are occupied Note SMBus API supports dual channel interface you can select the channel between and SMBus the SMBus DEMO utility demonstrate the default scenario of the accessing to SMBus device Note Please make sure the device s slave address is correct and writable Ir before actually writing data Otherwise permanent hardware damage may result iManager Software API User Manual 20 4 7 Smart Fan iManager s design provides the smart fans for the user to monitor the fan speed and pre define it based on the system temperature Monitoring the states of the device fan and capable to self control the fan speed actively depends on the thermal changes Ra SmartFan Config Fan Y Speed RPM 2430 Thermal Zone Source 0 Thermal Type i CPU Temperature Centigrade 46 PWM RPM Mode OFF Full Manual Auto Manual PWM 0 100 Option intro There are four modes supported Mode W Off Stop the fan Full The fan runs at full speed Manual Setting the fan speed manually in PWM format Auto Setting the policy to dynamic control the fan speed based on the system temperature
27. T pfnCallback Description The call back function pointer can be transmit from Application Parameters pfnCallback Call back function pointer SUSI WDOG CALLBACK EVENT is function pointer type The type define just like show below typedef void SUSI SDOG CALLBACK EVENT Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS GPIO Functions COM Express specifies pins for general purpose I Os The EAPI provides a set of functions to control these hardware GPIO pins Common Parameters Single GPIO addressing Each GPIO pin can be addressed individually Individual GPIO Ids Description EAPI_GPIO_IDO GPIO 0 Bit mapped to Bit 0 EAPI_GPIO_ID1 GPIO 1 Bit mapped to Bit 0 EAPI GPIO ID2 GPIO 2 Bit mapped to Bit 0 EAPI GPIO ID3 GPIO 3 Bit mapped to Bit 0 EAPI GPIO ID4 GPIO 4 Bit mapped to Bit 0 EAPI GPIO ID5 GPIO 5 Bit mapped to Bit 0 EAPI GPIO ID6 GPIO 6 Bit mapped to Bit 0 EAPI GPIO ID7 GPIO 7 Bit mapped to Bit 0 Parallel GPIO addressing A group of selected GPIO pins can be addressed simultaneously Multiple GPIO Ids Description EAPI ID GPIO BANKOO GPIO 0 31 Bit mapped to Bit 0 31 65 iManager Software API User Manual 5 2 8 2 EApiGPIOGetDirectionCaps EC_API ULONG EAPI_CALLTYPE EApiGPIOGetDirectionCaps ULONG Id GPIO Id ULO
28. TATUS_INVALID_BLOCK_LENGTH Read Error EAPI_STATUS_READ_ERROR ByteCnt gt BufLen EAPI_STATUS_MORE_DATA Success EAPI STATUS SUCCESS iManager Software API User Manual 46 5 2 5 4 EApiStorageAreaWrite EC_API ULONG EAPI_CALLTYPE EApiStorageAreaWrite ULONG ld Storage Area Id ULONG Offset Byte Offset void pBuffer Pointer to Data pBuffer ULONG ByteCnt Number of bytes to write Description Writes data to the selected user data area Parameters Id See Storage 195 Offset Storage area start address offset in bytes This value must be a multiple of pBlockLength pBuffer Pointer to a buffer containing the data to be stored ByteCnt Size in bytes of the information pointed to by the pBuffer parameter Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBuffer NULL EAPI_STATUS_INVALID_PARAMETER ByteCnt 0 EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED Offset ByteCnt gt pStorageSize EAPI_STATUS_INVALID_BLOCK_LENGTH Write Error EAPI_STATUS_WRITE_ERROR Success EAPI_STATUS_SUCCESS 47 iManager Software API User Manual 5 2 5 5 SusiStorageArealsLocked EC_API ULONG EAPI_CALLTYPE SusiStorageArealsLocked ULONG dwFlags Description Check the storage area is locked Parameters Id See Storage 195 dwFlags Reserved Return Status Code ULONG ld St
29. VALID_PARAMETER pDirection NULL EAPI_STATUS_INVALID_PARAMETER Unsupported ID EAPI_STATUS_UNSUPPORTED Unknown status EAPI_STATUS_NOT_FOUND EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 67 iManager Software API User Manual 5 2 8 4 EApiGPIOSetDirection EC_API ULONG EAPI_CALLTYPE EApiGPIOSetDirection ULONG ld GPIO ld ULONG Bitmask Bit mask of Affected Bits ULONG Direction Direction Description Sets the configuration for the selected GPIO ports Parameters Id See GPIO 106 Bitmask Bit mask Direction Sets the direction of the selected GPIO ports Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Bitmask 0 EAPI_STATUS_INVALID_PARAMETER Direction 0 amp amp Direction 1 EAPI STATUS INVALID PARAMETER Unsupported ID EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 68 5 2 8 5 EApiGPlOGetLevel EC_API ULONG EAPI_CALLTYPE EApiGPIOGetLevel ULONG ld GPIO Id ULONG Bitmask Bit mask of Affected Bits ULONG pLevel Current Level Description Read the from GPIO ports Parameters Id See GPIO Ids Bitmask Bit mask Only selected bits are returned pLevel Pointer to a buffer that receives the GPIO level Results can be read on a bit level Return Status Code Conditi
30. Vendor Specific Library Version Manufacturer Library Manufacturer MPNPID Manufacturer PNPID OFilename Original File name Description Library Description Sample SVersion 0 5 LVersion 0 5 721 Manufacturer ADVANTECH MPNPID PMG OFilename libEApiPMG so 0 5 Description Embedded Application Programming Interface 97 iManager Software API User Manual iManager Software API User Manual 98 Appendix E EAPI ID Definition WII T TII EAPI ID Board information define EAPI ID BOARD MANUFACTURER STR define EAPI ID BOARD NAME STR define EAPI ID BOARD REVISION STR define EAPI ID BOARD SERIAL STR define EAPI ID BOARD BIOS REVISION STR define EAPI ID BOARD HW REVISION STR define ID BOARD PLATFORM TYPE STR II define EAPI_ID_GET_EAPI_SPEC_VERSION define EAPI_ID_BOARD_BOOT_COUNTER_VAL define EAPI_ID_BOARD_RUNNING_TIME_METER_VAL define EAPI_ID_BOARD_PNPID_VAL define EAPI_ID_BOARD_PLATFORM_REV_VAL define EAPI_ID_BOARD_DRIVER_VERSION_VAL define EAPI_ID_BOARD_LIB_VERSION_VAL define EAPI_ID_BOARD_FIRMWARE_VERSION_VAL Temperature define EAPI ID HWMON CPU TEMP define EAPI ID HWMON CHIPSET TEMP define EAPI ID HWMON SYSTEM TEMP define EAPI ID HWMON CPU define EAPI ID HWMON CHIPSET define EAPI ID HWMON SYSTEM define EAPI ID HWMON CPU TEMP2 define EAPI ID HWMON CHIPSET T
31. _API H includes the API declaration constants and flags that are required for programming W Define h include defines of variables Library Files W EAPI 1 dll is a dynamic link library that exports all the API functions Demo Program The iManager 2 0 utility released with sample source code demonstrates how to fully use iManager features The Library is written in C and utility is written in C Drivers m AdvEC sys x86 or AdvEC Win7 AMD64A sys x64 is the driver that controls the hardware 5 1 Status Codes All EAPI functions immediately return a status code from a common list of possible errors Any function may return any of the defined status codes See the Appendix for more detailed information 5 1 1 Status Code Description EAPI STATUS NOT INITIALIZED Description The EAPI library is not yet or unsuccessfully initialized EApiLiblnitialize needs to be called prior to the first access of any other EAPI function Actions Call EApiLiblnitialize EAPI STATUS INITIALIZED Description Library is initialized Actions None EAPI STATUS ALLOC ERROR Description Memory Allocation Error Actions Free memory and try again iManager Software API User Manual 28 EAPI_STATUS_SW_TIMEOUT Description Software timeout This is Normally caused by hardware software semaphore timeout Actions Retry EAPI_STATUS_INVALID_PARAMETER Description One or more ofthe EAPI fun
32. acklight Enable Values Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pEnable NULL EAPI STATUS INVALID PARAMETER unknown Id EAPI STATUS UNSUPPORTED EC command fail EAPI STATUS ERROR Success STATUS SUCCESS 37 iManager Software API User Manual 5 2 4 3 EApiVgaSetBacklightEnable EC_API ULONG EAPI_CALLTYPE EApiVgaSetBacklightEnable ULONG ld Backlight Id ULONG Enable Backlight Enable Description Enables the backlight of the selected flat panel display Parameters Id See Backlight Ids Enable Backlight Enable options See Backlight Enable Values Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Enable EAPI_BACKLIGHT_SET_ON amp amp Enable EAPI_BACKLIGHT_SET_OFF EARLS WADE PARAME TEM unknown Id EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 38 5 2 4 4 EApiVgaGetBacklightBrightness EC_API ULONG EAPI_CALLTYPE EApiVgaGetBacklightBrightness ULONG Id Backlight Id ULONG pBright Backlight Brightness Description Reads the current brightness of the selected flat panel display Parameters Id See Backlight Ids pBright Pointer to a buffer that receives the current backlight brightness level See Backlight Brigh
33. ccess EAPI STATUS SUCCESS iManager Software API User Manual 52 5 2 6 4 Eapil2CReadTransfer EC_API ULONG EAPI_CALLTYPE EApil2CReadTransfer ULONG ld 12C Bus Id ULONG Addr Encoded 7 10Bit I2C Device Address ULONG 126 Command Offset Void pBuffer Transfer Data pBuffer ULONG BufLen Data pBuffer Length ULONG ByteCnt Byte Count to read Description Reads from a specific register in the selected 2 device Reads from 12 device at the I C address Addr the amount of ByteCnt bytes to the buffer pBuffer while using the device specific command Cmd Depending on the addressed 12 device be a specific command or a byte offset Parameters Id See 2 Bus Ids Addr Encoded 7 10 Bit Device Address Cmd Encoded 12 Device Command Index pBuffer Pointer to a buffer that receives the read data This parameter can be NULL if the data is not required BufLen Size in bytes of the buffer pointed to by the pBuffer parameter ByteCnt Size in bytes of data to be read Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBuffer NULL EAPI_STATUS_INVALID_PARAMETER ByteCnt 0 EAPI_STATUS_INVALID_PARAMETER BufLen 0 EAPI_STATUS_INVALID_PARAMETER Unknown Id EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 53 iManager Software API U
34. ch speeds development enhances security and offers add on value for Advantech platforms 1 2 Benefits m Enhance System Reliability Protect system with multi level watchdog Auto adjust the fan speed based on the temperature Real time monitoring of system status m Manage Onboard Devices Record boot information Protect important information in encrypted data space Multi control interfaces for peripheral devices iManager 2 0 Intelligent Management a iManager Software API User Manual 2 1 2 1 1 2 2 1 2 3 1 2 4 1 2 5 Simplify Integration Unique embedded functions are built in to the iManager s uniform set of APIs such as watchdog monitoring smart battery and so on This offers a multi control interface for easy integration with all kind of peripherals we have standard SMBus and multi GPIO Enhance Reliability Advanced watchdog smart fan hardware monitoring and CPU throttling are pro vided by iManager totally independent of the OS Secure the System iManager provides an encryption space for storage of sensitive customer data such as user ID and password secure keys for hard drive locks and security IDs to pro tect your applications Easy System Upgrade Uniform and OS independent interface for cross hardware platforms and uniform API across different OSs make it easy to migrate to other platforms or OSs Increased Performance New Mail Box Technology Coll
35. ction call parameters are out of the defined range Actions Verify Function Parameters EAPI_STATUS_INVALID_BLOCK_LENGTH Description This means that the Block length is too long Actions Use relevant Capabilities information to correct select block lengths EAPI_STATUS_INVALID_BLOCK_ALIGNMENT Description The Block Alignment is incorrect Actions Use Alignment Capabilities information to correctly align write access EAPI_STATUS_INVALID_DIRECTION Description The current Direction Argument attempts to set GPIOs to a unsupported directions Setting GPI to Output Actions Use pInputs and pOutputs to correctly select input and outputs EAPI STATUS INVALID BITMASK Description The Bitmask Selects bits GPIOs which are not supported for the current ID Actions Use pInputs and pOutputs to probe supported bits EAPI STATUS UNSUPPORTED Description This function or ID is not supported at the actual hardware environment Actions None 29 iManager Software API User Manual EAPI_STATUS_NOT_FOUND Description Selected device was not found Example The device address is not Acknowledged device is not present or inactive Actions None EAPI STATUS BUSY COLLISION Description The selected device or ID is busy or a data collision was detected Example The addressed I C bus is busy or there is a bus collision m The C bus is in use Eithe
36. ctions iManager can communicate with 4SMBus channel System write slave address com mand data and protocol into corresponding RAM address then iManager will trans late it to SMBus protocol and communicate with SMBus device 5 2 11 1 Select one Controller The iManager provides two way to access SMBus s device one is access by iMan ager another one is access by southbridge The API s name will be defined as below Access by southbridge don t need any change Access by iManager need inside two character EC in it For Example Modify SusiSMBusRead Byte to SusiECSMBusReaaByte 5 2 11 2 SusiSMBusReset EC_API ULONG EAPI_CALLTYPE SusiSMBusReset void Description SMBus slaves are expected to reset their interface whenever Clock is low for longer than the time out specified in the SMBus specification of 35ms Parameters None Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED SMBus Controller fail STATUS ERROR Success EAPI STATUS SUCCESS 77 iManager Software API User Manual 5 2 11 3 SusiSMBusReadByte SusiECSMBusReadByte EC_API ULONG EAPI_CALLTYPE SusiSMBusReadByte UCHAR bAddr UCHAR bReg UCHAR Description Read a byte of data from the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 w
37. e Data 0 00 Read Data Read Write Read Write Data String Offset 0x00 write String Length 0 63 0 Read String Erase Read Write Write Protection Password 8 Digits Lock Unlock Check Function DEMO DEMO 1 Read Write Data Byte into EEPROM 1 Give the proper value to the Offset and Write Data text boxes 2 Click the Read button for read operation Click the Write button with value in Write Data field for write operation 3 The value read or to be written is showed in the Read Data text box DEMO 2 Read Write Data String or Erase a block into EEPROM 1 Give the proper value to the Offset and Length text boxes 2 Click the Read button for read string operation Click the Write button with value in Write Data field for write string operation Click the Erase button toerase block 3 The value read or to be written is showed in the Read Data text box DEMO 3 Write Protection Lock Unlock OEM EEPROM AREA 1 Enter the password in the Password text box 2 Click Check button the status will be displayed an Advantech SUSI Message Box 3 Ifthe message shows Unlocked you can click the Lock button then the area will be locked by the password 13 iManager Software API User Manual 4 5 Otherwise you can click the Unlock button to unlock this area if the secret key is correct You can always click the Check button to check the
38. e the device s slave address is correct and writable before actually writing data Otherwise permanent hardware damage result SMBus Allows to interface an embedded system environment and transfer serial messages using protocol allowing multiple simultaneous device control SMBus SMBus Protocol Quick BYTE BLOCK BYTE DATA WORD DATA Parameter Slave Address Hex 00 Byte Count Register Offset Hex ex 00 00 OEC South Bridge Input Data ex 00 ff 7 0 Result Hex 0 Function DEMO DEMO 1 Read data by SMBus 1 Choose one of the protocol operations in the Protocol field QUICK BYTE BYTE DATA WORD DATA and Block 2 Enter the proper values for Slave address and Register offset text boxes Some protocol operations don t have register offsets 19 iManager Software API User Manual 3 Click the Read button to read receive operations 4 The value read from this address is showed in the Result Hex text box DEMO 2 Write data by SMBus 1 Choose one of the protocol operations in Protocol field QUICK BYTE BYTE DATA WORD DATA and Block 2 Enter the proper values for Slave address and Register offset text boxes Some protocol operations don t have register offsets 3 Type a value in Input Data box 4 Click the Write button to write send operations 5 The values to be written are showed in the Result Hex text box
39. ect all await data into a memory buffer and write out through iManager GPIO I C SMBus interfaces at once It s the technology introduced to improve the accessing speed 3 iManager Software API User Manual iManager Software API User Manual Chapter 2 System Requirements 2 1 iManager Utility amp System Requirements 2 1 1 Hardware This Utility amp supports Advantech platforms only with the iManager2 0 module please see the release notes and check the support list before using it 2 1 2 Operating Systems Windows XP Professional SP3 Windows XP Embedded SP3 Windows Embedded Standard 2009 Windows 7 SP1 x86 x64 Windows Embedded Standard 7 SP1 x86 x64 Ubuntu 10 04 1 2 1 3 Software Requirements W NET Framework 2 0 Windows OS m Basic Development utilities amp libraries Linux OS iManager Software API User Manual 6 Chapter 3 API amp Utility Installation 3 1 iManager Utility for Windows OS Run the SETUP wizard to begin the installation of iManager 2 0 All files including Utility Library Header User Manual and Sample Code will deploy to the location C Program Files Advantech EmbStore AD ANTECH Enabling an Intelligers Planet iManager 10 Plugins Configuration 1 Plugins Embedded Software Suite mbedded Software Suite Figure 3 1 iManager 2 0 Utility Main Window iManager_WDT Multi level watchdog timer for enabling t
40. ef struct _SUSIAUTOFANCONFIG ULONG dwZone the fan control connects to which thermal source from 0 to 3 ULONG dwOpMode RPM 1 or PWM 0 ULONG dwLowStopTemp when the temperature drops to this value the fan will stop ULONG dwLowTemp when the temperature rises to this value the fan will work in dwLow speed ULONG dwHighTemp when the temperature rises to this value the fan will work in dwHigh speed ULONG dwLowPWM fan speed in low status using the PWM module ULONG dwHighPWM fan speed in high status using the PWM module ULONG dwLowRPM fan speed in low status using the RPM module ULONG dwHighRPM fan speed in high status using the RPM module typedef struct _SUSIFANCONFIG ULONG dwSize size of the structure itself must be initialized with size of SUSIFANCONFIG ULONG dwMode TurnOFF 0 TurnFull 1 TurnManual 2 TurnAuto 3 ULONG dwPWM fan speed controlled by PWM 0 to 100 SUSIAUTOFANCONFIG safConfig SUSIFANCONFIG PSUSIFANCOMFIG 71 iManager Software API User Manual 5 2 9 2 SusiFanSetConfigStruct EC_API ULONG SusiFanSetConfigStruct ULONG dwUnit SUSIFANCONFIG pConfig Description Set auto fan function mode Parameters dwUnit The unit number you want to control pConfig Pointer to the auto fan function config Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED dwUn
41. ery Voltage volts EAPI ID HWMON VOLTAGE 5V 5V Voltage volts EAPI ID HWMON VOLTAGE 5VSB 5V Standby Voltage volts EAPI ID HWMON VOLTAGE 12V 12V Voltage volts EAPI ID HWMON FAN CPU CPU Fan RPM1 EAPI ID HWMON FAN SYSTEM System Fan RPM1 Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED pValue NULL EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED Success EAPI_STATUS_SUCCESS iManager Software API User Manual 36 5 2 4 5 2 4 1 5 2 4 2 Backlight Functions This function sub set facilitates backlight control for Integrated flat panel displays typically LVDS Common Parameters Backlight Ids Selects the flat panel display Id Description EAPI_ID_BACKLIGHT_1 Backlight Local Flat Panel 1 EAPI_ID_BACKLIGHT_2 Backlight Local Flat Panel 2 EAPI_ID_BACKLIGHT_3 Backlight Local Flat Panel 3 Backlight Enable Values Name Description EAPI_BACKLIGHT_SET_ON Requests Signifies that the Backlight be Enabled EAPI BACKLIGHT SET OFF Requests Signifies that the Backlight be Disabled EApiVgaGetBacklightEnable EC API ULONG EAPI CALLTYPE EApiVgaGetBacklightEnable ULONG ld Backlight Id ULONG pEnable Backlight Enable Description Returns current Backlight Enable state for specified Flat Panel Parameters Id See Backlight Ids pEnable Pointer to a buffer that receives the current backlight enable state See B
42. frequency Parameters See 12 Bus Ids Freq Update a new frequency The frequency must be 0 to 100KHz or 400KHz Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED EC command fail STATUS ERROR Freq gt 100 amp amp Freq 400 EAPI STATUS INVALID PARAMETER Success EAPI STATUS SUCCESS 59 iManager Software API User Manual 5 2 7 WATCHDOG After the watchdog timer has been set by the EApiWDogStart function it must be trig gered by EApiWDogTrigger within delay EventTimeout milliseconds as set with the EApiWDogStart function following the initial trigger every subsequent trigger must occur within EventTimeout milliseconds Should EApiWDogTrigger not be called within the relevant time limit a system reset will occur EAPI watchdog timer may support two stages If the watchdog is not triggered within the event timeout an NMI IRQ or hardware output will be generated Then the reset timeout becomes active If the watchdog timer is not triggered within the reset timeout a reset will be generated Initial Timing A B D Delay Event Timeout Reset Timeout Reboot time Timing after EApiWDogTrigger E F G i Event Timeout Reset Timeout time Stage A Watchdog is started Stage B Initial Delay Period is exhausted Stage C F Event is triggered NMI IRQ or PIN is Triggered To Al
43. he flexible and intelligent hardware protection iManager Tools iManager_VGA Controlling the brightness and backlight for integrated flat panel displays LVDS Interface iManager Tools iManager_ThermalProtection The mechanism of hardware protection feature base onthermal decreasing with CPU throttling technology iManager Tools iManager_Storage Implementation of accessing data from secured EEPROM iManager Tools 1 4 iManager Software API User Manual 8 iManager_SMB Enable accessing to SMBus device with multi selectable protocols iManager Tools iManager_SmartFan Programmable based oftemperature for dynamicfan speed self control iManager Tools iManager 12 Enable the accessing to 2 device with multiple selective protocols Ie iManager Tools iManager_HWM Monitoring CPU and system fan speed CPU temperature and voltage status of platform iManager Tools GPIO iManager GPIO Utility for GPIO ports read write tests and direction setting iManager Tools iManager_Boardinformation Retrieve hardware and software information from onboard EEPROM Driverand API library A iManager Tools 0 1 Figure 3 2 Function List ithin the Utility 9 iManager Software API User Manual Microsoft Windows 1 ESS exe Utility 2 Resource Doc User Manual The device manager will show the Advantech Embedded Software Suite
44. iManager SMBus Controller fail STATUS ERROR Success EAPI_STATUS SUCCESS EAPI STATUS UNSUPPORTED 81 iManager Software API User Manual 5 2 11 7 SusiSMBusReceiveByte SusiECSMBusReceiveByte EC_API ULONG EAPI_CALLTYPE SusiSMBusReceiveByte UCHAR bAddr UCHAR pDataByte E Description Receive information in a byte from the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored pDataByte Pointer to a variable in which the function receives the byte information Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 82 5 2 11 8 SusiSMBusSendByte SusiECSMBusSendByte EC_API ULONG EAPI_CALLTYPE SusiSMBusSendByte UCHAR bAddr UCHAR bData Description Send information in bytes to the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bData Specifies the byte information to be sent Return Status Code Condition Return Value Library Uni
45. in value format Parameters Id Selects the Get Value Sub function Id pValue Pointer to a buffer that receives the value s data Id Description Units Format Specification Ver Specification EAPI_ID_GET_EAPI_SPEC_VERSION sion used to implement ber Format see API Appendix EAPI_ID_BOARD_BOOT_COUNTER_V AL Boot Counter boots1 EAPI ID BOARD RUNNING TIME MET ER VAL Running Time Meter hours1 EAPI ID BOARD PNPID VAL Board Vendor PNPID vel Support EAPI ID BOARD PLATFORM REV VAL Platform Specification Version used to create Specification board Number Format Version see Appendix E General Ver EAPI ID BOARD DRIVER VERSION V AL Vendor Specific Driver sion number Version Format 1 see Appendix E General Ver EAPI ID BOARD VERSION VAL Vendor Specific Library sion number Version Format 1 see Appendix E General Ver EAPI ID BOARD FIRMWARE VERSION VAL firmware Version 9 9 number Format 1 see Appendix E EAPI ID HWMON CPU TEMP CPU Temperature 1 centigrade EAPI ID HWMON CHIPSET TEMP Chipset Temperature 1 centigrade EAPI ID HWMON SYSTEM TEMP System Temperature 1 centigrade Id Description Units Format EAPI ID HWMON VOLTAGE VCORE CPU Core Voltage volts1 EAPI ID HWMON VOLTAGE 2V5 2 5V Voltage volts 35 iManager Software API User Manual EAPI ID HWMON VOLTAGE 3 3V Voltage volts EAPI ID HWMON VOLTAGE VBAT Batt
46. it 1 EAPI STATUS INVALID PARAMETER pConfig NULL EAPI STATUS INVALID PARAMETER pConfig dwMode SUSI FAN MODE AUTO EAPI STATUS INVALID PARAMETER pConfig dwPWM SUSI FAN EAPI STATUS INVALID PARAMETER pConfig dwZone SUSI FAN MODE AUTO ZONES EAPI STATUS INVALID PARAMETER dwHighTemp SUSI FAN TEMP EAPI STATUS INVALID PARAMETER dwLowTemp SUSI FAN TEMP EAPI STATUS INVALID PARAMETER dwLowStopTemp SUSI FAN TEMP MAX EAPI STATUS INVALID PARAMETER dwLowStopTemp gt dwLowTemp EAPI_STATUS_INVALID_PARAMETER dwHighRPM gt SUSI_FAN_RPM_MAX EAPI_STATUS_INVALID_PARAMETER dwLowRPM gt SUSI_FAN_RPM_MAX EAPI_STATUS_INVALID_PARAMETER dwHighPWM gt SUSI_FAN_PWM_MAX EAPI_STATUS_INVALID_PARAMETER dwLowPWM gt SUSI_FAN_PWM_MAX EAPI_STATUS_INVALID_PARAMETER EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 72 5 2 9 3 SusiFanGetConfigStruct EC_API ULONG SusiFanGetConfigStruct ULONG dwUnit SUSIFANCONFIG Description Get information about auto fan function mode Parameters dwUnit The unit number you want to control pConfig Pointer to the auto fan function config Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED dwUnit 1 EAPI STATUS INVALID PARAMETER pConfig NULL EAP
47. l zone or Thermal Source represents the thermal sensor pre sets for smart fan speed reference there are 4 thermal zones available for configuration through the API By factory default zone 0 and zone 1 are configured and fixed to refer CPU sensor for both CPU fan and sys tem fan iManager Software API User Manual 22 4 8 Thermal Protection Setup the controls of CPU throttling threshold to auto sense the state of temperature Thermal Protection Setting Preset Thermal Source Event Type Trigger Temperature Celsius Stop Temperature Celsius Current Temperature Temperature Centigrade 2 O4 CPU Thermal 1 remote v Power off Throttle Power Button 50 40 Option intro Get Set Preset iManager 2 0 provides four presets for thermal protection Thermal source Sensor source selection Event type Select protection trigger event Power Button sends power button signal to the OS to shut down the device Throttle forces CPU frequency to the lowest setting for example Power Off hard shutdown power off Trigger temperature Above this temperature CPU throttling kicks in do not set too low Stop temperature Above this temperature CPU throttling discontinues Note not set value of temp too low in shutdown or power off mode or the platform will not boot up correctly solution un plug the power wait for reset the settings Note
48. low for possible Soft ware Recovery Stage D G System is reset Stage Watchdog is Triggered m EApiWDogTrigger EApiWDogStop Must be called before Stage C F to prevent event from being generated m EApiWDogTrigger EApiWDogStop Must be called before Stage D G to prevent The system from being reset iManager Software API User Manual 60 5 2 7 1 EApiWDogGetCap EC_API ULONG EAPI_CALLTYPE EApiWDogGetCap ULONG pMaxDelay Max supported delay in msec ULONG pMaxEventTimeout Max supported event timeout in msec 0 Unsupported ULONG pMaxResetTimeout Max supported reset timeout in msec Description Get the capabilities of the watchdog timer Check the timer s boundary Parameters pMaxDelay Pointer to a buffer that receives maximum supported initial delay time of the watchdog timer in milliseconds pMaxEventTimeout Pointer to a buffer that receives maximum supported event timeout of the watchdog timer in milliseconds pMaxResetTimeout Pointer to a buffer that receives maximum supported event timeout of the watchdog timer in milliseconds Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED Unsupported EAPI STATUS UNSUPPORTED pMaxDelay NULL amp amp pMaxResetTimeout NULL amp amp pMaxEventTimeout NULL Success EAPI_STATUS SUCCESS EAPI_STATUS_INVALID_PARAMETER 61 iManager Software API User Manual 5 2 7 2
49. meter can be NULL if the data is not required pBlockLength Pointer to a buffer that receives the storage areas Block size Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pStorageSize NULL amp amp pBlockLength NULL EAPI STATUS INVALID PARAMETER Unsupported Id EAPI_STATUS_UNSUPPORTED Success EAPI_STATUS_SUCCESS 45 iManager Software API User Manual 5 2 5 3 EApiStorageAreaRead EC_API ULONG EAPI_CALLTYPE EApiStorageAreaRead ULONG ld Storage Area Id ULONG Offset Byte Offset void pBuffer Pointer to Data pBuffer ULONG BufLen Data pBuffer Size in bytes ULONG ByteCnt Number of bytes to read Description Reads data from the selected user data area Parameters Id See Storage 195 Offset Storage area start address offset in bytes pBuffer Pointer to a buffer that receives the read data BufLen Size in bytes of the buffer pointed to by the pBuffer parameter ByteCnt Size in bytes of the information read to the buffer pointed to by the pBuffer parameter Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBuffer NULL EAPI_STATUS_INVALID_PARAMETER ByteCnt 0 EAPI_STATUS_INVALID_PARAMETER BufLen 0 EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED Offset ByteCnt gt pStorageSize EAPI_S
50. nitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 83 iManager Software API User Manual 5 2 11 9 SusiSMBusWriteQuick SusiECSMBusWriteQuick EC_API ULONG EAPI_CALLTYPE SusiSMBusWriteQuick UCHAR bAddr Description Turn SMBus device function off on or disable enable a specific device mode Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored Return Status Code Condition Library Uninitialized Return Value EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager SMBus Controller fail EAPI_STATUS_UNSUPPORTED EAPI_STATUS_ERROR Success EAPI STATUS SUCCESS 5 2 11 10SusiSMBusReadQuick SusiECSMBusReadQuick EC_API ULONG EAPI_CALLTYPE SusiSMBusReadQuick UCHAR bAddr Description Turn SMBus device function on off or enable disable a specific device mode Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give 1 read or 0 write to the LSB of SlaveAddress could be ignored Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR
51. not be possible to load the shared library due to missing dependencies Solution Filename Convention libEApiYYY so W Z Part Example Description YYY PMG Vendor PNPID 1 Specification Version number X 0 EAPI Specification Revision number Soname Convention libEApi so W Part Example Description 1 Specification Version number Example Shared Library Filename libEapiPMG so 1 0 soname libEApi so 1 in file system usr lib libEApi so 1 usr lib libEapiPMG so 1 0 usr lib libEapiPMG so 1 0 see http EApiDK sourceforge net for sample implementation ELF a out Format Shared Libraries Library Output Format Problem Due to the nature of ELF Dynamic Link Libraries in Linux UNIX it may not be pos sible to distinguish one manufacturer s DLL from another Although it would possible to do this using a tool that uses the API It may not be possible to load the DLL due to missing dependencies Solution The solution is to require the shared libraries be executable Upon Execution the library should then print out the following information iManager Software API User Manual 96 The Output format is lt Variable name gt Value and should be matched by this regular expression m s w s s s where 1 Variable name 2 Value Data Variable Name Description SVersion EApi Standard Version used to create Library LVersion
52. o be transferred dwLen Size in bytes of data to be read Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED pBytes NULL EAPI_STATUS_INVALID_PARAMETER EC command fail EAPI_STATUS_READ_ERROR Success EAPI_STATUS_SUCCESS 57 iManager Software API User Manual 5 2 6 9 EApiSetl2CMode EC_API ULONG EAPI_CALLTYPE EApiSetl2CMode ULONG dwModerlag Description Assign 12 device to be byte or word offset Default value is byte offset Parameters dwModeFlag The value 1 is byte offset 2 is word offset Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED dwModeFlag 1 dwModeFlag 2 EAPI STATUS INVALID PARAMETER Success EAPI STATUS SUCCESS 5 2 6 10 EApiGetl2CSMBFrequency EC API ULONG EAPI CALLTYPE EApiGetl2CSMBFrequency ULONG Id PULONG pFreq Description Get I C clock frequency Parameters Id See 2 Bus Ids pFreq Get the current 2 frequency The frequency range is from OKHz to 400KHz Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 58 5 2 6 11 EApiSetl2CSMBFrequency EC_API ULONG EAPI_CALLTYPE EApiSetl2CSMBFrequency ULONG ld ULONG Freq Description Get I C clock
53. oftware API User Manual 4 5 General Purpose lOs GPIO GPIO Control Set single GPIO Direction In or Out or Level Status High or Low DATA Read Write Testing and Define the Direction and protocol of 8 Pin GPIO Bu crio GPIO Control GPIO Bank Control ceo co 9 0 Bankoo 999949446 GPIO 02 GPIO 03 1 GPIO 04 GPIO 05 GPIO 06 2 GPIO 07 Get Set Get Set dy Input Direction di Output Direction Q High Level G Low Level Function DEMO Demo 1 Set single GPIO 1 In GPIO control frame 2 Click radio button 3 Click icons to setting I O direction and High Low status 4 Click Set to apply Demo 2 Read single GPIO 1 In GPIO frame 2 Click radio button 3 Click Get to read data and show the result to icons Demo 3 Bank protocol write 8 pin GPIO data in one time 1 In GPIO bank control frame 2 Click radio button 3 Click icons to set the I O direction and High Low status 4 Click Set to apply iManager Software API User Manual 18 4 6 Demo 4 Bank protocol read 8 pin GPIO data in one time 1 GPIO bank control frame 2 Click radio button 3 Click Get to read data and shows the result to icons Note GPIO pin definition will change for different platforms due to hardware Ta design Please reference the hardware platform user manual to get detailed information Note Please make sur
54. on Probes IC address to test 2 Device present Parameters Id See 2 Bus Ids Addr Encoded 7 10 Bit IC Device Address pBytes The pointer to the destination buffer dwLen The number of sequential bytes to read Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED Probe Device and no response STATUS ERROR Success STATUS SUCCESS 55 iManager Software API User Manual 5 2 6 7 Susil2CRead EC_API ULONG EAPI_CALLTYPE Susil2CRead ULONG UCHAR ULONG Description bAddar pBytes dwLen Read a continuous data from 12 device The offset will increase automatically Parameters bAddr Encoded 7 10 Bit 2 Device Address pByte Pointer to a buffer that receives the read data dwLen Size in bytes of data to be read Return Status Code Condition Return Value EAPI STATUS NOT INITIALIZED Library Uninitialized EAPI STATUS INVALID PARAMETER pBytes NULL EC command fail EAPI STATUS READ ERROR Success EAPI STATUS SUCCESS iManager Software API User Manual 56 5 2 6 8 Susil2CWrite EC_API ULONG EAPI_CALLTYPE Susil2CWrite ULONG bAddr UCHAR ULONG dwLen Description Write a continuous data to 1 C device The offset will increase automatically Parameters bAddr Encoded 7 10 Bit IC Device Address pByte Pointer to a buffer containing the data t
55. on Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED Bitmask 0 EAPI_STATUS_INVALID_PARAMETER Unsupported ID EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 69 iManager Software API User Manual 5 2 8 6 EApiGPlOSetLevel EC_API ULONG EAPI_CALLTYPE EApiGPIOSetLevel ULONG Id GPIO Id ULONG Bitmask Bit mask of Affected Bits ULONG Level Level Description Write to GPIO ports Depending on the hardware implementation writing multiple GPIO ports with the bit mask option does not guarantee a time synchronous change of the output levels Parameters Id See GPIO Ids Bitmask Value for a bit mask Only selected bits are changed Unselected bits remain unchanged Level Input level of the selected GPIO port Output for single ports is on a bit level Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED Bitmask 0 EAPI_STATUS_INVALID_PARAMETER Unsupported ID EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 70 5 2 9 SmartFan Functions 5 2 9 1 Fan Speed Control SusiFanSetConfigStruct function call is used to set fan speed configuration You can use this function to easily control the fan speed It takes a pointer to an instance of structure SUSIFANCONFIG which is defined as follows typed
56. orage Area Id Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 48 5 2 5 6 SusiStorageAreaLock EC_API ULONG EAPI_CALLTYPE SusiStorageAreaLock ULONG ld Storage Area Id ULONG dwFlags Reserved char pBytes ULONG dwLen y Description Lock a storage area for write protect Parameters See Storage Ids dwFlags Reserved for future use set to 0 pByte Lock of key buffer dwLen Number of key buffer Return Status Code Condition Return Value Library Uninitialized pBytes NULL EAPI_STATUS_NOT_INITIALIZED EAPI_STATUS_INVALID_PARAMETER dwLen gt EEPROM_SECURE_KEY_SIZE EC command fail EAPI_STATUS_INVALID_PARAMETER EAPI_STATUS_ERROR Success 49 EAPI_STATUS_SUCCESS iManager Software API User Manual 5 2 5 7 SusiStorageAreaUnlock EC_API ULONG EAPI_CALLTYPE SusiStorageAreaUnlock ULONG ld Storage Area Id ULONG dwFlags Reserved char pBytes ULONG dwLen Description Lock a storage area for write protect Parameters Id See Storage lds dwFlags Reserved pByte Un Lock of key buffer dwLen Number of key buffer Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBytes NULL EAPI_STATUS_INV
57. protection status Note For the default password of a new platform please remain empty and unlock the storage at first time setup 4 3 Probe and access 12 bus to get the capabilities and doing read write tests to specific registers in selected 2 devices aw I2C RC Protocol 9 Read Write Register O WriteReadCombine Read Write Block by offset Read Write Block continuous Parameter Slave Address Hex ex AE 00 Frequency 50 100 400 Register Offset Hex ex 00 00 Offset Type BYTE O WORD Input Data ex 00 ff 7f Hex Read Num 0 Result 0 Function DEMO Common Step Set IC device slave address Demo 1 Read write register Access specific register once a time through interface Set offset Set offset type Byte WORD 2 bytes Key in input data only 1 byte word Click Write Click Read to confirm the data has been written or not iManager Software API User Manual 14 Demo 2 Write read combine Read specific range of data from device after specific offset address ignore the register offset configuration W Set offset type W Setread amp write number Key in input offset amp data Note The first entry of data is the offset address Click WriteRead Combined Demo 3 Read write block by block Set offset Block read write to the data on I C device after specific offset WB Set
58. r hour 2006516292 Board Vendor PNPID Empty EAPI Specification Version 1 0 EAPI Driver Version 1 0 0 EAPI Library Version 1 0 0 iManager Firmware Version 17 7 768 Board Information Access Information of the hardware platform from EEPROM SPI ROM iManager Driver and Library All params follow standard definition of EAPI Board Manufacturer Name The creator of this platform usually ADVANTECH Board Name This is platform name Serial Number This number is input by the factory used for sales tracking and service e g ABC000000020 Board BIOS Revision The version of BIOS file e g BIOS Version 1 10 Platform Type Spec type of hardware Board Platform Specification Revision Board spec revision Boot Counter Boot up times Running Time Meter Running times in hours Board Vendor PNPID Microsoft Plug and Play ID API Specification Version Version of the used EAPI specification EAPI Driver Version Version of the EAPI Driver EAPI Library Version Version of the EAPI Library iManager 2 0 Firmware Version Advantech firmware revision of iManager 25 iManager Software API User Manual iManager Software API User Manual 26 Programming Overview amp API Reference The iManager API provides the functions to control ADVANTECH iManager plat forms API functions are based on a dynamic library Our Advantech iManager API can be implemented in various other programming languages Header Files m REL_EC
59. r CLK or DAT are low W Arbitration loss or bus Collision data remains low when writing a 1 Actions Retry EAPI STATUS RUNNING Description Watchdog timer already started Actions Call EApiWDogStop before retrying EAPI STATUS HW TIMEOUT Description Function call timed out Example 2 operation lasted too long Actions Retry EAPI STATUS READ ERROR Description An error was detected during a read operation Example 2 Read function was not successful Actions Retry iManager Software API User Manual 30 EAPI STATUS WRITE ERROR Description An error was detected during a write operation Example m C Write function was not successful m No Acknowledge was received after writing any byte after the first address byte m be caused by unsupported device command index m 10Bit Address Device Not Present B Storage Write Error Actions Retry EAPI STATUS MORE DATA Description The amount of available data exceeds the buffer size Storage buffer overflow was prevented Read count was larger than the defined buffer length Actions Either increase the buffer size or reduce the block length EAPI STATUS ERROR Description Generic error message No further error details are available Actions None EAPI STATUS SUCCESS The value for this status code is defined as O Description The operation was successful Actions None 31 iManager Soft
60. rary Uninitialized EAPI_STATUS_NOT_INITIALIZED unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 86 5 2 11 13SusiSMBusReadBlock SusiECSMBusReadBlock EC_API ULONG EAPI_CALLTYPE SusiSMBusReadBlock UCHAR bAddr UCHAR bReg UCHAR Result UCHAR ByteCount Description Read multi data from the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to write data to Result Pointer to a byte array in which the function reads the block data ByteCount Pointer to a byte in which specifies the number of bytes to be read and also return succeed bytes Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED unknown access method by iManager EAPI STATUS UNSUPPORTED SMBus Controller fail EAPI STATUS ERROR Success EAPI STATUS SUCCESS 87 iManager Software API User Manual iManager Software API User Manual 88 Specification Version Number Format A 1 Specification Version Number Format Definition Bits Description 31 24 Version 23 16 Revision 15 0 0 Example Hex Interpreted 0x03040000 3 4 0x0 1100000 1 16 0x020100
61. rite to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to read data from pDataByte Pointer to a variable in which the function reads the byte data Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pDataByte NULL EAPI_STATUS_INVALID_PARAMETER unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI STATUS SUCCESS iManager Software API User Manual 78 5 2 11 4 SusiSMBusReadWord SusiECSMBusReadWord EC_API ULONG EAPI_CALLTYPE SusiSMBusReadWord UCHAR UCHAR bReg USHORT pDataWord Description Read a word 2 bytes of data from the target slave device in the SMBus Parameters bAddr Specifies the 8 bit device address ranging from 0x00 OxFF Whether to give a 1 read or 0 write to the LSB of SlaveAddress could be ignored bReg Specifies the offset of the device register to word data from pDataWord Pointer to a variable in which the function reads the word data Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pDataByte NULL EAPI_STATUS_INVALID_PARAMETER unknown access method by iManager EAPI_STATUS_UNSUPPORTED SMBus Controller fail EAPI_STATUS_ERROR Success EAPI STATUS SUCCESS 79 iManager Software API User Manual 5 2 11 5 SusiSMBusWriteByte
62. ser Manual 5 2 6 5 EApil2CWriteTransfer EC_API ULONG EAPI_CALLTYPE EApil2CWriteTransfer ULONG ld 12C Bus Id ULONG Addr Encoded 7 10Bit I2C Device Address ULONG 126 Command Offset void pBuffer Transfer Data pBuffer ULONG Byte Count to write Description Write to a specific register the selected 2 device Writes to an 2 device at the 2 address Addr the amount of ByteCnt bytes from the buffer pBuffer while using the device specific command Cmd Depending on the addressed 2 device can be a specific command or a byte offset Parameters Id See I C Bus 145 Addr Encoded 7 10 Bit I C Device Address Cmd Encoded 12 Device Command Index pBuffer Pointer to a buffer containing the data to be transferred ByteCnt Size in bytes of the information pointed to by the pBuffer parameter Return Status Code Condition Return Value Library Uninitialized STATUS NOT INITIALIZED pBuffer NULL EAPI_STATUS_INVALID_PARAMETER ByteCnt 0 EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS iManager Software API User Manual 54 5 2 6 6 EApil2CProbeDevice EC_API ULONG EAPI_CALLTYPE EApil2CProbeDevice ULONG ld 12C Bus Id ULONG Addr Encoded 7 10Bit 2 Device Address Char pBytes ULONG dwLen Descripti
63. t EAPI BACKLIGHT SET BRIGHTEST EAPI STATUS INVALID PARAMETER unknown Id EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS 41 iManager Software API User Manual 5 2 4 7 EApiVgaSetPolarity EC_API ULONG EAPI_CALLTYPE EApiVgaSetPolarity ULONG ld Backlight Id ULONG dwSetting Frequency of Panel Description Sets the polarity of the selected flat panel display Parameters Id See Backlight Ids dwSetting Polarity state 1 is invert 0 is no invert Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED dwSetting 0 dwSetting 1 EAPI STATUS INVALID PARAMETER unknown Id EAPI STATUS UNSUPPORTED EC command fail STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 42 5 2 4 8 EApiVgaGetBacklightLevel EC_API ULONG EAPI_CALLTYPE EApiVgaGetBacklightLevel ULONG ld Backlight Id ULONG pLevel Backlight Level Description Reads the current brightness level of the selected flat panel display Parameters Id See Backlight Ids pLevel Pointer to a buffer that receives the current backlight brightness level From 0 to 9 Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBright NULL EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSU
64. tness Value Range Return Status Code Condition Return Value Library Uninitialized EAPI_STATUS_NOT_INITIALIZED pBright NULL EAPI_STATUS_INVALID_PARAMETER unknown Id EAPI_STATUS_UNSUPPORTED EC command fail EAPI_STATUS_ERROR Success EAPI_STATUS_SUCCESS 39 iManager Software API User Manual 5 2 4 5 EApiVgaSetBacklightBrightness EC_API ULONG EAPI_CALLTYPE EApiVgaSetBacklightBrightness ULONG ld Backlight Id ULONG Bright Backlight Brightness Description Sets the brightness of the selected flat panel display Parameters Id See Backlight Ids Bright Backlight Brightness level The value is from 0 to 100 percentage Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED Bright EAPI BACKLIGHT SET BRIGHTEST EAPI STATUS INVALID PARAMETER unknown Id EAPI STATUS UNSUPPORTED EC command fail EAPI STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 40 5 2 4 6 EApiVgaSetFrequency EC_API ULONG EAPI_CALLTYPE EApiVgaSetFrequency ULONG ld Backlight Id ULONG dwSetting Frequency of Panel Description Sets the frequency of the selected flat panel display Parameters Id See Backlight Ids dwSetting Frequency value The value is from 0 to 1000000 Hz Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED Brigh
65. ware API User Manual 5 2 5 2 1 5 2 2 5 2 2 1 EAPI Define EC_API EAPI_CALLTYPE WINAPI stdcall ULONG unsigned long Initialization Functions EApiLiblnitialize EC API ULONG EAPI CALLTYPE EApiLiblnitialize void Description General initialization of the EAPI Prior to calling any EAPI function the library needs to be initialized by calling this function The status code for all EAPI function will be EAPI STATUS NOT INITIALIZED unless this function is called Parameters None Return Status Code Condition Return Value Library initialized EAPI STATUS INITIALIZED Library initial fail EAPI STATUS ERROR Success STATUS SUCCESS iManager Software API User Manual 32 5 2 2 2 EApiLibUnlnitialize EC_API ULONG EAPI_CALLTYPE EApiLibUnlnitialize void Description General function to uninitialized the EAPI library Should be called before program exit In a dynamic library environment this function is not expected to replace the native uninitialize routines It Is expected that in this environments this function has no functionality Parameters None Return Status Code Condition Return Value Library Uninitialized EAPI STATUS NOT INITIALIZED Success EAPI STATUS SUCCESS 33 iManager Software API User Manual 5 2 3 EAPI Information Functions 5 2 3 1 EApiBoardGetStringA EC_API ULONG EAPI_CALLTYPE EApiBoardGetStringA

Download Pdf Manuals

image

Related Search

Related Contents

  9948 Series - Propane Stove  View User`s Manual  Strip LED - ETI, S.A.  Manual  Philips Scart cable SWV3602W  tica Trabalhista  Service Manual  INSTRUCTION 電池についてのお願いとご注意 補修用  

Copyright © All rights reserved.
Failed to retrieve file