33#ifndef PROTOCORE_PMBUS_H
34#define PROTOCORE_PMBUS_H
38#if PROTOCORE_ENABLE_PMBUS
46#define PROTOCORE_PMBUS_PAGE 0x00u
48#define PROTOCORE_PMBUS_OPERATION 0x01u
50#define PROTOCORE_PMBUS_ON_OFF_CONFIG 0x02u
52#define PROTOCORE_PMBUS_CLEAR_FAULTS 0x03u
54#define PROTOCORE_PMBUS_CAPABILITY 0x19u
56#define PROTOCORE_PMBUS_VOUT_MODE 0x20u
58#define PROTOCORE_PMBUS_VOUT_COMMAND 0x21u
60#define PROTOCORE_PMBUS_VOUT_MAX 0x24u
62#define PROTOCORE_PMBUS_VOUT_OV_FAULT_LIM 0x40u
64#define PROTOCORE_PMBUS_IOUT_OC_FAULT_LIM 0x46u
66#define PROTOCORE_PMBUS_OT_FAULT_LIMIT 0x4Fu
68#define PROTOCORE_PMBUS_VIN_OV_FAULT_LIM 0x55u
70#define PROTOCORE_PMBUS_STATUS_BYTE 0x78u
72#define PROTOCORE_PMBUS_STATUS_WORD 0x79u
74#define PROTOCORE_PMBUS_STATUS_VOUT 0x7Au
76#define PROTOCORE_PMBUS_STATUS_IOUT 0x7Bu
78#define PROTOCORE_PMBUS_STATUS_INPUT 0x7Cu
80#define PROTOCORE_PMBUS_STATUS_TEMP 0x7Du
82#define PROTOCORE_PMBUS_STATUS_CML 0x7Eu
84#define PROTOCORE_PMBUS_READ_VIN 0x88u
86#define PROTOCORE_PMBUS_READ_IIN 0x89u
88#define PROTOCORE_PMBUS_READ_VOUT 0x8Bu
90#define PROTOCORE_PMBUS_READ_IOUT 0x8Cu
92#define PROTOCORE_PMBUS_READ_TEMP_1 0x8Du
94#define PROTOCORE_PMBUS_READ_TEMP_2 0x8Eu
96#define PROTOCORE_PMBUS_READ_FAN_SPEED_1 0x90u
98#define PROTOCORE_PMBUS_READ_POUT 0x96u
100#define PROTOCORE_PMBUS_READ_PIN 0x97u
102#define PROTOCORE_PMBUS_MFR_ID 0x99u
104#define PROTOCORE_PMBUS_MFR_MODEL 0x9Au
106#define PROTOCORE_PMBUS_MFR_REVISION 0x9Bu
108#define PROTOCORE_PMBUS_ST_NONE_ABOVE 0x01u
110#define PROTOCORE_PMBUS_ST_CML 0x02u
112#define PROTOCORE_PMBUS_ST_TEMPERATURE 0x04u
114#define PROTOCORE_PMBUS_ST_VIN_UV 0x08u
116#define PROTOCORE_PMBUS_ST_IOUT_OC 0x10u
118#define PROTOCORE_PMBUS_ST_VOUT_OV 0x20u
120#define PROTOCORE_PMBUS_ST_OFF 0x40u
122#define PROTOCORE_PMBUS_ST_BUSY 0x80u
124#define PROTOCORE_PMBUS_MODE_LINEAR 0u
126#define PROTOCORE_PMBUS_MODE_VID 1u
128#define PROTOCORE_PMBUS_MODE_DIRECT 2u
130#define PROTOCORE_PMBUS_MODE_IEEE 3u
132#define PROTOCORE_PMBUS_INVALID INT32_MIN
138} PmbusVoutModeKindArgs;
144} PmbusVoutExponentArgs;
150} PmbusL11MantissaArgs;
156} PmbusL11ExponentArgs;
162} PmbusLinear11MicroArgs;
168} PmbusLinear11EncodeArgs;
175} PmbusLinear16MicroArgs;
182} PmbusLinear16EncodeArgs;
191} PmbusDirectMicroArgs;
205} PmbusReadVoutModeArgs;
213} PmbusReadLinear11Args;
222} PmbusReadLinear16Args;
231} PmbusWriteLinear16Args;
238} PmbusStatusByteArgs;
245} PmbusStatusWordArgs;
251} PmbusClearFaultsArgs;
261} PmbusReadMfrStringArgs;
323 PmbusVoutModeKindArgs vout_mode_kind_args;
324 PmbusVoutExponentArgs vout_exponent_args;
325 PmbusL11MantissaArgs l11_mantissa_args;
326 PmbusL11ExponentArgs l11_exponent_args;
327 PmbusLinear11MicroArgs linear11_micro_args;
328 PmbusLinear11EncodeArgs linear11_encode_args;
329 PmbusLinear16MicroArgs linear16_micro_args;
330 PmbusLinear16EncodeArgs linear16_encode_args;
331 PmbusDirectMicroArgs direct_micro_args;
332 PmbusSetPageArgs set_page_args;
333 PmbusReadVoutModeArgs read_vout_mode_args;
334 PmbusReadLinear11Args read_linear11_args;
335 PmbusReadLinear16Args read_linear16_args;
336 PmbusWriteLinear16Args write_linear16_args;
337 PmbusStatusByteArgs status_byte_args;
338 PmbusStatusWordArgs status_word_args;
339 PmbusClearFaultsArgs clear_faults_args;
340 PmbusReadMfrStringArgs read_mfr_string_args;
349 void (*
const vout_mode_kind)(uint8_t *work);
350 void (*
const vout_exponent)(uint8_t *work);
351 void (*
const l11_mantissa)(uint8_t *work);
352 void (*
const l11_exponent)(uint8_t *work);
353 void (*
const linear11_micro)(uint8_t *work);
354 void (*
const linear11_encode)(uint8_t *work);
355 void (*
const linear16_micro)(uint8_t *work);
356 void (*
const linear16_encode)(uint8_t *work);
357 void (*
const direct_micro)(uint8_t *work);
358 void (*
const begin)(uint8_t *work);
359 void (*
const set_page)(uint8_t *work);
360 void (*
const read_vout_mode)(uint8_t *work);
361 void (*
const read_linear11)(uint8_t *work);
362 void (*
const read_linear16)(uint8_t *work);
363 void (*
const write_linear16)(uint8_t *work);
364 void (*
const status_byte)(uint8_t *work);
365 void (*
const status_word)(uint8_t *work);
366 void (*
const clear_faults)(uint8_t *work);
367 void (*
const read_mfr_string)(uint8_t *work);
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS