?? lm87smbpep.h
字號:
/* lm87SmbPep.h - Header for the LM87 ACPI hardware monitor (SMBus) library *//* Copyright 2002 Kontron Modular Computers GmbH *//*modification history--------------------01a,15mar01,mme created - based on lm81SmbPep.h*/#ifndef __INClm87SmbPep_h#define __INClm87SmbPep_h#ifdef __cplusplusextern "C" {#endif/* includes */#include "vxWorks.h"#include "versionPep.h"/* defines */PEP_VERSION(lm87SmbPep_h,01c) /* version identifier *//* SMBus address definitions */#define LM87_ADDR1 0x2e /* address of 1st LM87 on PEP boards *//* polling task definitions */#define LM87_POLL_PRIORITY 253 /* default priority of the polling task *//* defintions to select thresholds */#define LM87_LOW 0 /* select low threshold */#define LM87_HIGH 1 /* select high threshold *//* definitions to select temperature measurement */#define LM87_TEMP_INT 0 /* select internal temperature measurement */#define LM87_TEMP_RMT 1 /* select remote temperature measurement *//* definitions for voltage handling */#define LM87_V1 0 /* measure at +2.5V pin */#define LM87_V2 1 /* measure at Vcore pin */#define LM87_V3 2 /* measure at +3.3V pin */#define LM87_V4 3 /* measure at +5.0V pin */#define LM87_V5 4 /* measure at +12V pin */#define LM87_V6 5 /* measure at VCCP2 pin *//* definitions for fan handling */#define LM87_FAN1 0 /* measure at FAN1 pin */#define LM87_FAN2 1 /* measure at FAN2 pin */#define LM87_DIV1 1 /* FAN count divisor 1 */#define LM87_DIV2 2 /* FAN count divisor 2 */#define LM87_DIV4 4 /* FAN count divisor 4 */#define LM87_DIV8 8 /* FAN count divisor 8 *//* register offsets */#define LM87_HW1_INT_TEMP_HL 0x13 /* internal temp. hardware high limit register - lockable */#define LM87_HW1_RMT_TEMP_HL 0x14 /* remote temp. hardware high limit register - lockable */#define LM87_HW2_INT_TEMP_HL 0x17 /* internal temp. hardware high register limit */#define LM87_HW2_RMT_TEMP_HL 0x18 /* remote temp. hardware high register limit */#define LM87_CFG1 0x40 /* configuration register 1*/#define LM87_ISR1 0x41 /* interrupt status register 1 */#define LM87_ISR2 0x42 /* interrupt status register 2 */#define LM87_IMR1 0x43 /* interrupt mask register 1 */#define LM87_IMR2 0x44 /* interrupt mask register 2 */#define LM87_CICL 0x46 /* CI clear register */#define LM87_VIDF 0x47 /* VID/Fan divisor register */#define LM87_VID4 0x49 /* VID4 register */#define LM87_CFG2 0x4a /* configuration register 2*/#define LM87_ISR1_MIR 0x4c /* interrupt status register 1 mirror - reading does not reset the status bits */#define LM87_ISR2_MIR 0x4d /* interrupt status register 2 mirror - reading does not reset the status bits */#define LM87_SMBALERT 0x80 /* SMBAlert register*//* parameter ram offsets */#define LM87_VRDAC 0x19 /* DAC data register address */#define LM87_RAM_2V5 0x20 /* 2.5V value address */#define LM87_RAM_VCCP1 0x21 /* Vccp1 value address */#define LM87_RAM_3V3 0x22 /* 3.3V value address */#define LM87_RAM_5V 0x23 /* 5V value address */#define LM87_RAM_12V 0x24 /* 12V value address */#define LM87_RAM_VCCP2 0x25 /* Vccp2 value address */#define LM87_RAM_RMT_TEMP 0x26 /* remote temperature value address */#define LM87_RAM_INT_TEMP 0x27 /* internal temperature value address */#define LM87_RAM_FAN1 0x28 /* FAN1 counter value address */#define LM87_RAM_FAN2 0x29 /* FAN2 counter value address */#define LM87_RAM_2V5_HL 0x2b /* 2.5V high limit address */#define LM87_RAM_2V5_LL 0x2c /* 2.5V low limit address */#define LM87_RAM_VCCP1_HL 0x2d /* Vccp1 high limit address */#define LM87_RAM_VCCP1_LL 0x2e /* Vccp1 low limit address */#define LM87_RAM_3V3_HL 0x2f /* 3.3V high limit address */#define LM87_RAM_3V3_LL 0x30 /* 3.3V low limit address */#define LM87_RAM_5V_HL 0x31 /* 5V high limit address */#define LM87_RAM_5V_LL 0x32 /* 5V low limit address */#define LM87_RAM_12V_HL 0x33 /* 12V high limit address */#define LM87_RAM_12V_LL 0x34 /* 12V low limit address */#define LM87_RAM_VCCP2_HL 0x35 /* Vccp2 high limit address */#define LM87_RAM_VCCP2_LL 0x36 /* Vccp2 low limit address */#define LM87_RAM_RMT_TEMP_HL 0x37 /* remote temperature 1 high limit address */#define LM87_RAM_RMT_TEMP_LL 0x38 /* remote temperature 1 low limit address */#define LM87_RAM_INT_TEMP_HL 0x39 /* internal temperature high limit address */#define LM87_RAM_INT_TEMP_LL 0x3a /* internal temperature low limit address */#define LM87_RAM_FAN1_LL 0x3b /* FAN1 counter low limit address */#define LM87_RAM_FAN2_LL 0x3c /* FAN2 counter low limit address *//* configuration register 1 bits */#define LM87_CFG1_START (1<<0) /* start monitoring */#define LM87_CFG1_INTERRUPT (1<<1) /* enables the INT# interrupt output */#define LM87_CFG1_THERM (1<<2) /* enables the THERM# interrupt output */#define LM87_CFG1_INTCLR (1<<3) /* clear INT bit / resume monitoring */#define LM87_CFG1_THERMCLR (1<<6) /* clears the THERM# output */#define LM87_CFG1_INIT (1<<7) /* set LM87 to POR state *//* configuration register 2 bits */#define LM87_CFG2_THERM_ACPI (1<<3) /* sets THERM# output mode to ACPI-mode *//* interrupt status register 1 bits */#define LM87_ISR1_V1 (1<<0) /* +2.5V high/low limit exceeded */#define LM87_ISR1_V2 (1<<1) /* Vccp1 high/low limit exceeded */#define LM87_ISR1_V3 (1<<2) /* +3.3V high/low limit exceeded */#define LM87_ISR1_V4 (1<<3) /* +5V high/low limit exceeded */#define LM87_ISR1_INT_TEMP (1<<4) /* internal temperature high/low limit exceeded */#define LM87_ISR1_RMT_TEMP (1<<5) /* remote temperature high/low limit exceeded */#define LM87_ISR1_FAN1 (1<<6) /* FAN1 count limit exceeded */#define LM87_ISR1_FAN2 (1<<7) /* FAN2 count limit exceeded *//* interrupt status register 2 bits */#define LM87_ISR2_V5 (1<<0) /* +12V high/low limit exceeded */#define LM87_ISR2_V6 (1<<1) /* Vccp2 high/low limit exceeded *//* interrupt mask register 1 bits */#define LM87_IMR1_V1 (1<<0) /* +2.5V interrupt */#define LM87_IMR1_V2 (1<<1) /* Vccp1 interrupt */#define LM87_IMR1_V3 (1<<2) /* +3.3V interrupt */#define LM87_IMR1_V4 (1<<3) /* +5V interrupt */#define LM87_IMR1_INT_TEMP (1<<4) /* internal temperature interrupt */#define LM87_IMR1_RMT_TEMP (1<<5) /* remote temperature interrupt */#define LM87_IMR1_FAN1 (1<<6) /* fan1 interrupt */#define LM87_IMR1_FAN2 (1<<7) /* fan2 interrupt *//* interrupt mask register 2 bits */#define LM87_IMR2_V5 (1<<0) /* +12V interrupt */#define LM87_IMR2_V6 (1<<1) /* Vccp2 interrupt *//* smbalert register */#define LM87_SMBALERT_ENABLE (1<<6) /* enables the SMBALERT mode *//* function declarations */#if defined(__STDC__) || defined(__cplusplus)IMPORT STATUS lm87SmbInit (UINT8 smbAddr, int pollPriority);IMPORT STATUS lm87WaitForIrq (UINT8 smbAddr);IMPORT STATUS lm87EnableIrq (UINT8 smbAddr, UINT8 interruptMask1, UINT8 interruptMask2);IMPORT STATUS lm87DisableIrq (UINT8 smbAddr, UINT8 interruptMask1, UINT8 interruptMask2);IMPORT STATUS lm87DacSet (UINT8 smbAddr, int value);IMPORT STATUS lm87FanCountGet (UINT8 smbAddr, UINT8 fan, UINT8* pCount);IMPORT STATUS lm87FanDivisorGet (UINT8 smbAddr, UINT8 fan, UINT8* pDivisor);IMPORT STATUS lm87FanDivisorSet (UINT8 smbAddr, UINT8 fan, UINT8 divisor);IMPORT STATUS lm87FanLimitGet (UINT8 smbAddr, UINT8 fan, UINT8* pLimit);IMPORT STATUS lm87FanLimitSet (UINT8 smbAddr, UINT8 fan, int limit);IMPORT STATUS lm87Poll (UINT8 smbAddr);IMPORT STATUS lm87StatusGet (UINT8 smbAddr, UINT8* pIrqStatus1, UINT8* pIrqStatus2);IMPORT STATUS lm87TempGet (UINT8 smbAddr, UINT8 tempLocation, INT8* pTemperature);IMPORT STATUS lm87TempLimitGet (UINT8 smbAddr, UINT8 tempLocation, UINT8 setpoint, INT8* pLimit);IMPORT STATUS lm87TempLimitSet (UINT8 smbAddr, UINT8 tempLocation, UINT8 setpoint, INT8 limit);IMPORT STATUS lm87VidGet (UINT8 smbAddr, UINT8* pVidStatus);IMPORT STATUS lm87RegVoltGet (UINT8 smbAddr, UINT8 voltage, UINT8* pVoltage);IMPORT STATUS lm87VoltGet (UINT8 smbAddr, UINT8 voltage, INT32* pVoltage);IMPORT STATUS lm87VoltLimitGet (UINT8 smbAddr, UINT8 voltage, UINT8 threshold, UINT8* pLimit);IMPORT STATUS lm87VoltLimitSet (UINT8 smbAddr, UINT8 voltage, UINT8 threshold, int limit);IMPORT STATUS lm87WaitForLimitViolation (UINT8 smbAddr, int ticks);#elseIMPORT STATUS lm87SmbInit ();IMPORT STATUS lm87WaitForIrq ();IMPORT STATUS lm87EnableIrq ();IMPORT STATUS lm87DisableIrq ();IMPORT STATUS lm87DacSet ();IMPORT STATUS lm87FanCountGet ();IMPORT STATUS lm87FanDivisorGet ();IMPORT STATUS lm87FanDivisorSet ();IMPORT STATUS lm87FanLimitGet ();IMPORT STATUS lm87FanLimitSet ();IMPORT STATUS lm87Poll ();IMPORT STATUS lm87StatusGet ();IMPORT STATUS lm87TempGet ();IMPORT STATUS lm87TempLimitGet ();IMPORT STATUS lm87TempLimitSet ();IMPORT STATUS lm87VidGet ();IMPORT STATUS lm87RegVoltGet ();IMPORT STATUS lm87VoltGet ();IMPORT STATUS lm87VoltLimitGet ();IMPORT STATUS lm87VoltLimitSet ();IMPORT STATUS lm87WaitForLimitViolation ();/* reference to drag in the component */LOCAL FUNCPTR p87SMBInit __attribute__ ((unused)) = lm87SmbInit;#endif /* __STDC__ */#ifdef __cplusplus}#endif#endif /* __INClm87SmbPep_h */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -