Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000,2001 Microsoft Corporation
  3. Module Name:
  4. tmpinfo.h
  5. Abstract: Contains SMBus Temperature Sensor Information definitions.
  6. Environment:
  7. User mode
  8. Author:
  9. Michael Tsang (MikeTs) 25-Jan-2001
  10. Revision History:
  11. --*/
  12. #ifndef _TMPINFO_H
  13. #define _TMPINFO_H
  14. //
  15. // Constants
  16. //
  17. #define SMB_TMPSENSOR_ADDRESS 0x18 //Address on bus (0x30)
  18. // Temperature sensor commands
  19. #define TMPCMD_RD_LOCALTMP 0x00
  20. #define TMPCMD_RD_REMOTETMP 0x01
  21. #define TMPCMD_RD_STATUS 0x02
  22. #define TMPCMD_RD_CONFIG 0x03
  23. #define TMPCMD_RD_CONVERSION_RATE 0x04
  24. #define TMPCMD_RD_LOCALTMP_HILIMIT 0x05
  25. #define TMPCMD_RD_LOCALTMP_LOLIMIT 0x06
  26. #define TMPCMD_RD_REMOTETMP_HILIMIT 0x07
  27. #define TMPCMD_RD_REMOTETMP_LOLIMIT 0x08
  28. #define TMPCMD_WR_CONFIG 0x09
  29. #define TMPCMD_WR_CONVERSION_RATE 0x0a
  30. #define TMPCMD_WR_LOCALTMP_HILIMIT 0x0b
  31. #define TMPCMD_WR_LOCALTMP_LOLIMIT 0x0c
  32. #define TMPCMD_WR_REMOTETMP_HILIMIT 0x0d
  33. #define TMPCMD_WR_REMOTETMP_LOLIMIT 0x0e
  34. #define TMPCMD_ONE_SHOT 0x0f
  35. #define TMPCMD_WR_SOFTWARE_POR 0xfc
  36. #define TMPCMD_RD_MANUFACTURER_ID 0xfe
  37. #define TMPCMD_RD_DEVICE_ID 0xff
  38. // Status byte bits
  39. #define TMPSTATUS_REMOTE_OPEN 0x04
  40. #define TMPSTATUS_REMOTE_LO_ALARM 0x08
  41. #define TMPSTATUS_REMOTE_HI_ALARM 0x10
  42. #define TMPSTATUS_LOCAL_LO_ALARM 0x20
  43. #define TMPSTATUS_LOCAL_HI_ALARM 0x40
  44. #define TMPSTATUS_BUSY 0x80
  45. // Config byte bits
  46. #define TMPCFG_STANDBY_MODE 0x40
  47. #define TMPCFG_MASK_ALERT 0x80
  48. #include <pshpack1.h>
  49. typedef struct _TMP_INFO
  50. {
  51. BYTE bLocalTmp;
  52. BYTE bRemoteTmp;
  53. BYTE bStatus;
  54. BYTE bConfig;
  55. BYTE bConversionRate;
  56. BYTE bLocalTmpHiLimit;
  57. BYTE bLocalTmpLoLimit;
  58. BYTE bRemoteTmpHiLimit;
  59. BYTE bRemoteTmpLoLimit;
  60. BYTE bManufacturerID;
  61. BYTE bDeviceID;
  62. } TMP_INFO, *PTMP_INFO;
  63. #include <poppack.h>
  64. #define TYPEF_CONV_RATE (TYPEF_USER + 0x20)
  65. #define CNV TYPEF_CONV_RATE
  66. #endif //ifndef TMPINFO_H