Macros | |
| #define | MTB_PMBUS_SEC_LEVEL_ENCODED_L0 (0x01U) |
| Encoded Security Level 0 value returned by mtb_pmbus_sec_get_level. | |
| #define | MTB_PMBUS_SEC_LEVEL_ENCODED_L1 (0x02U) |
| Encoded Security Level 1 value returned by mtb_pmbus_sec_get_level. | |
| #define | MTB_PMBUS_SEC_LEVEL_ENCODED_L2 (0x04U) |
| Encoded Security Level 2 value returned by mtb_pmbus_sec_get_level. | |
| #define | MTB_PMBUS_SEC_LEVEL_ENCODED_L3 (0x08U) |
| Encoded Security Level 3 value returned by mtb_pmbus_sec_get_level. | |
| #define | MTB_PMBUS_L0_MISSING_PASSKEY (0x01U) |
Bit set in the missing_mask output of mtb_pmbus_sec_check_l0_cmds when the PASSKEY command is absent from the command table. | |
| #define | MTB_PMBUS_L0_MISSING_ACCESS_CONTROL (0x02U) |
Bit set in the missing_mask output of mtb_pmbus_sec_check_l0_cmds when the ACCESS_CONTROL command is absent from the command table. | |
| #define | MTB_PMBUS_L0_MISSING_WRITE_PROTECT (0x04U) |
Bit set in the missing_mask output of mtb_pmbus_sec_check_l0_cmds when the WRITE_PROTECT command is absent from the command table. | |
Functions | |
| uint8_t | mtb_pmbus_sec_get_level (void) |
| Returns the encoded Security Level currently compiled into the Middleware. | |
| mtb_pmbus_status_t | mtb_pmbus_sec_check_l0_cmds (mtb_pmbus_stc_t *inst, uint8_t *missing_mask) |
| Checks that all mandatory Security Level 0 commands are registered in the command table. | |
| uint8_t mtb_pmbus_sec_get_level | ( | void | ) |
Returns the encoded Security Level currently compiled into the Middleware.
Returns one of MTB_PMBUS_SEC_LEVEL_ENCODED_L0, MTB_PMBUS_SEC_LEVEL_ENCODED_L1, MTB_PMBUS_SEC_LEVEL_ENCODED_L2, or MTB_PMBUS_SEC_LEVEL_ENCODED_L3 corresponding to the value of MTB_PMBUS_SEC_LEVEL.
| mtb_pmbus_status_t mtb_pmbus_sec_check_l0_cmds | ( | mtb_pmbus_stc_t * | inst, |
| uint8_t * | missing_mask ) |
Checks that all mandatory Security Level 0 commands are registered in the command table.
Verifies that the command table pointed to by inst contains entries for:
MTB_PMBUS_PASSKEY_CMD_CODE)MTB_PMBUS_ACCESS_CONTROL_CMD_CODE)MTB_PMBUS_WRITE_PROTECT_CMD_CODE)| inst | The pointer to the PMBus instance. |
| missing_mask | Output bitmask of missing commands. Use MTB_PMBUS_L0_MISSING_PASSKEY, MTB_PMBUS_L0_MISSING_ACCESS_CONTROL, and MTB_PMBUS_L0_MISSING_WRITE_PROTECT to test individual bits. Set to 0 on success. May be NULL if the caller does not need details. |
inst is NULL.