12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133 |
- /*
- * config sensor sdr in here.
- * Author:Jimbo
- */
- #include <stdio.h>
- #include <stdint.h>
- #include "com_IPMI_SDRRecord.h"
- /*
- * sdr table
- */
- const MgmtCtrlrDevLocator_T bmc_sdr = {
- /* SDR Record Header */
- {
- 0x01, //Record ID
- 0x51, //SDR Version
- MGMT_CTRL_DEV_LOCATOR_SDR_REC, //Record Type
- 11+MAX_ID_STR_LEN, //Record Length = 11+string length
- },
- /* Record Key Bytes*/
- 0x20, /* Slave address - 0x20 Primary BMC */
- 0x00, /* ChannelNumber - 0x00 Primary BMC */
-
- /* Record Body Bytes*/
- 0x0, /* power state notification */
- 0xff, /* Device Capablities */
- {0, 0, 0,}, /* RESERVED */
- 0x0, /* Entity ID */
- 0x1, /* Entity Instance */
- 0x0, /* OEM */
- 0xc0 +MAX_ID_STR_LEN, /* ID String Type / Length Code */
- "STM32F429_BMC"
- };
-
-
- /***************** Attation ************************
- * <Record ID>, <Sensor Number> must be modified!!!
- **************************************************/
-
- const FullSensorRec_T full_sdr_tbl[] = {
- /*
- * sensor number: 1
- * sensor name: +12V
- * brief: ltc4280
- */
- {
- /* SDR Record Header */
- {
- 0x02, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x01, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- /* M = 0x12e x 10^-4 */
- 0x3d, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfd<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+12V"
- },
- /*
- * sensor number: 2
- * sensor name: +12V_Current
- * brief: ltc4280
- */
- {
- /* SDR Record Header */
- {
- 0x03, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x02, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x5, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- /* M = 0x12e x 10^-4 */
- 0x2e, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x12e>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+12V_Current"
- },
-
- /*
- * sensor number: 3
- * sensor name: Temp_Board
- * brief: G780 local
- */
- {
- /* SDR Record Header */
- {
- 0x04, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x03, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x1, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x1, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (0x0<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0x7f, //Normal Maximum
- 0x80, //Normal Minimum
- 0x7f, //Sensor Maximum Reading
- 0x80, //Sensor Minimum Reading
- 0x7f, //Upper Non-Recoverable Threshold
- 0x7f, //Upper Critical Threshold
- 0x7f, //Upper Non-Critical Threshold
- 0x80, //Lower Non-Recoverable Threshold
- 0x80, //Lower Critical Threshold
- 0x80, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "Temp_Board"
- },
- /*
- * sensor number: 4
- * sensor name: Temp_FPGA
- * brief: G780 remote
- */
- {
- /* SDR Record Header */
- {
- 0x05, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x04, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x1, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x1, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (0x0<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0x7f, //Normal Maximum
- 0x80, //Normal Minimum
- 0x7f, //Sensor Maximum Reading
- 0x80, //Sensor Minimum Reading
- 0x7f, //Upper Non-Recoverable Threshold
- 0x7f, //Upper Critical Threshold
- 0x7f, //Upper Non-Critical Threshold
- 0x80, //Lower Non-Recoverable Threshold
- 0x80, //Lower Critical Threshold
- 0x80, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "Temp_FPGA"
- },
- /*
- * sensor number: 5
- * sensor name: +1.5V
- * brief: adc_ch1
- */
- {
- /* SDR Record Header */
- {
- 0x06, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x05, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+1.5V"
- },
- /*
- * sensor number: 6
- * sensor name: +0.75V
- * brief: adc_ch2
- */
- {
- /* SDR Record Header */
- {
- 0x07, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x06, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+0.75V"
- },
- /*
- * sensor number: 7
- * sensor name: +1.8V
- * brief: adc_ch3
- */
- {
- /* SDR Record Header */
- {
- 0x08, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x07, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+1.8V"
- },
- /*
- * sensor number: 8
- * sensor name: +1.2V
- * brief: adc_ch4
- */
- {
- /* SDR Record Header */
- {
- 0x09, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x08, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+1.2V"
- },
- /*
- * sensor number: 9
- * sensor name: +1.0V
- * brief: adc_ch5
- */
- {
- /* SDR Record Header */
- {
- 0x0A, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x09, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+1.0V"
- },
- /*
- * sensor number: 10
- * sensor name: +2.5V
- * brief: adc_ch6
- */
- {
- /* SDR Record Header */
- {
- 0x0B, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x0A, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- 0x81, //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+2.5V"
- },
- /*
- * sensor number: 11
- * sensor name: +3.3V
- * brief: adc_ch7
- */
- {
- /* SDR Record Header */
- {
- 0x0C, //Record ID
- 0x51, //SDR Version
- FULL_SDR_REC, //Record Type
- 43+MAX_ID_STR_LEN, //Record Length = 43+string length
- },
- /* Record Key Bytes */
- 0x20, //Sensor Owner ID
- 0x0, //Sensor Owner LUN
- 0x0B, //Sensor Number
- /* Record Body Bytes */
- 0x7, //Entity ID
- 0x1, //Entity Instance
- 0x7f, //Entity Initialization
- 0x68, //Sensor Capabilities
- 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan
- 0x01, //Event / Reading Type
- 0x7a95, //Lower Threshold Reading Mask
- 0x7a95, //Upper Threshold Reading Mask
- 0x3f3f, //Settable / Readable Threshold Mask
- /*
- [7:6] - Analog (numeric) Data Format**
- 00b = unsigned
- 01b = 1's complement(singed)
- 10b = 2's complement(singed)
- 11b = Does not return analog (numeric) reading
- [5:3] - Rate unit
- 000b = none
- 001b = per µS
- 010b = per ms
- 011b = per s
- 100b = per minute
- 101b = per hour
- 110b = per day
- 111b = reserved
- [2:1] - Modifier unit
- 00b = none
- 01b = Basic Unit / Modifier Unit
- 10b = Basic Unit * Modifier Unit
- 11b = reserved
- [0] - Percentage 0b = no, 1b = yes
- */
- (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1
- /*
- 0 unspecified
- 1 degrees C
- 2 degrees F
- 3 degrees K
- 4 Volts
- 5 Amps
- */
- 0x4, //Sensor Units 2 - Base Unit
- 0x0, //Sensor Units 3 - Modifier Unit
- 0x0, //Linerization
- /* M = 0x103 */
- (0x103 & 0xff), //M_LSB
- /*
- [7:6] - M: MS 2 bits
- [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts)
- */
- ((0x103>>2)&0xC0)+(0x0&0x3F), //M,Tolerance
- 0x0, //B_LSB
- /*
- [7:6] - B: MS 2 bits
- Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned
- Accuracy exponent:
- [5:0] - Accuracy: LS 6 bits
- */
- ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy
- ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent
- (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent
- 0x0, //Analog Characteristics Flags
- 0x7f, //Nominal Reading
- 0xff, //Normal Maximum
- 0x00, //Normal Minimum
- 0xff, //Sensor Maximum Reading
- 0x00, //Sensor Minimum Reading
- 0xff, //Upper Non-Recoverable Threshold
- 0xff, //Upper Critical Threshold
- 0xff, //Upper Non-Critical Threshold
- 0x00, //Lower Non-Recoverable Threshold
- 0x00, //Lower Critical Threshold
- 0x00, //Lower Non-Critical threshold
- 0x0, //Positive - threshold Hysteresis value
- 0x0, //Negative - threshold Hysteresis value
- 0x0, //Reserved
- 0x0, //Reserved
- 0x0, //OEM
- 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code
- "+3.3V"
- },
- };
- const CompactSensorRec_T Compact_sdr_tbl[] = {
- {0}, //dummy sensor, make compiler happy.
- };
|