Functions | |
| void | mtb_pmbus_smbalert_config_mode (mtb_pmbus_stc_t *inst, mtb_pmbus_smbalert_mode_t mode) |
| Sets the mode for SMBALERT pin. | |
| void | mtb_pmbus_smbalert_set_signal (mtb_pmbus_stc_t *inst) |
| Set low level for SMBALERT pin. | |
| void | mtb_pmbus_smbalert_clear_signal (mtb_pmbus_stc_t *inst) |
| Set hign level for SMBALERT pin. | |
| uint8_t | mtb_pmbus_smbalert_apply_mask (mtb_pmbus_stc_t *inst, uint8_t status_cmd_code, uint8_t status_bits) |
| Applies the currently configured SMBALERT_MASK (0x1B) mask for the given STATUS_x command code to a set of candidate status bits. | |
| void mtb_pmbus_smbalert_config_mode | ( | mtb_pmbus_stc_t * | inst, |
| mtb_pmbus_smbalert_mode_t | mode ) |
Sets the mode for SMBALERT pin.
| inst | The pointer to the PMBus instance structure |
| mode | The selected mode, mtb_pmbus_smbalert_mode_t |
| void mtb_pmbus_smbalert_set_signal | ( | mtb_pmbus_stc_t * | inst | ) |
Set low level for SMBALERT pin.
Once the SMBALERT signal sets to 0, the Middleware starts to response on Alert Response Address.
This function does nothing if mtb_pmbus_stc_config_t::enable_smbalert is set to NULL.
| inst | The pointer to the PMBus instance structure |
| void mtb_pmbus_smbalert_clear_signal | ( | mtb_pmbus_stc_t * | inst | ) |
Set hign level for SMBALERT pin.
This function does nothing if mtb_pmbus_stc_config_t::enable_smbalert is set to NULL.
The middleware stops response on Alert Response Address once this function is called. If the SMBALERT mode is MTB_PMBUS_SMBALERT_MODE_AUTO, the middleware automatic clears the SMBALERT signal, otherwise clear the signal manually in mtb_pmbus_handle_events_t callback when MTB_PMBUS_ALERT_RESPONSE_ADDR_EVENT is triggered.
| inst | The pointer to the PMBus instance structure |
| uint8_t mtb_pmbus_smbalert_apply_mask | ( | mtb_pmbus_stc_t * | inst, |
| uint8_t | status_cmd_code, | ||
| uint8_t | status_bits ) |
Applies the currently configured SMBALERT_MASK (0x1B) mask for the given STATUS_x command code to a set of candidate status bits.
Per the PMBus specification, the bits in a SMBALERT_MASK mask byte align with the bits of the corresponding STATUS_x register: a mask bit of 1 blocks the associated status bit from causing the SMBALERT# signal to be assigned; a mask bit of 0 allows it. The application code that detects a fault/warning condition should call this function with the relevant STATUS_x command code and the raw candidate status bits, then only call mtb_pmbus_smbalert_set_signal if the returned value is non-zero.
In addition to a register's own mask, this function also applies the cross-register cascading effect that masking STATUS_BYTE or STATUS_WORD has on the following registers, when status_cmd_code identifies one of them: STATUS_VOUT, STATUS_IOUT, STATUS_INPUT, STATUS_TEMPERATURE, STATUS_CML, STATUS_OTHER, STATUS_MFR_SPECIFIC, STATUS_FANS_1_2, and STATUS_FANS_3_4. Masking via STATUS_BYTE/STATUS_WORD only ever adds more blocked bits; it never unblocks a bit already blocked by the register's own mask.
| inst | The pointer to the PMBus instance structure |
| status_cmd_code | The STATUS_x command code the candidate bits belong to |
| status_bits | The raw candidate status bits about to be signalled |