mtb-pmbus 1.2.0.1772
 
Loading...
Searching...
No Matches
Compile Time Options Macros

General Description

Macros

#define MTB_PMBUS_SUPPORT_PMBUS   (1U)
 Enable or disable PMBus support.
 
#define MTB_PMBUS_SUPPORT_ZONE   (1U)
 Enable or disable Zone Write and Zone Read support.
 
#define MTB_PMBUS_SUPPORT_SMBALERT   (1U)
 Enable or disable SMBus Alert support.
 
#define MTB_PMBUS_SUPPORT_HOST_NOTIFY   (0U)
 Enable or disable Host Notify Protocol.
 
#define MTB_PMBUS_CTRL_SUPPORT_HOST_NOTIFY   (0U)
 Enable or disable Host Notify Protocol to support Controller Host mode.
 
#define MTB_PMBUS_SUPPORT_GEN_CALL_ADDR   (1U)
 Enable or disable General Call support.
 
#define MTB_PMBUS_SUPPORT_EXT_CMD   (0U)
 Enable or disable Extended commands.
 
#define MTB_PMBUS_SUPPORT_PEC   (1U)
 Enable or disable PEC.
 
#define MTB_PMBUS_PAGES_NUM   (0x10U)
 Set the maximum number of pages.
 
#define MTB_PMBUS_IMPL_CMD_PAGE_SEL_ADV   (0U)
 When enabled, the application can control the page selection initiated by the controller using the Page callback.
 
#define MTB_PMBUS_PHASES_NUM   (0x10U)
 Set the maximum number of phases.
 
#define MTB_PMBUS_IMPL_CMD_PHASE_SEL_ADV   (0U)
 When enabled, the application can control the phase selection initiated by the controller using the Phase callback.
 
#define MTB_PMBUS_ENABLE_CONFIG_CHECK   (1U)
 Enable the checking of configuration parameters (recommended only for debug purposes).
 
#define MTB_PMBUS_CONFIG_FULL_CHECK   (1U)
 Define the level of the configuration parameter checking: 0U: Minimal checking, only critical parameters (e.g., to avoid hard faults).
 
#define MTB_PMBUS_ZONE_MAX_NUM   (0x7FU)
 Define the range for Zone values.
 
#define MTB_PMBUS_ZONE_SEL_ADV   (0U)
 When enabled, the application can control the zone selection initiated by the controller using the Zone callback.
 
#define MTB_PMBUS_ENABLE_CMD_CALLBACK_ADV   (0U)
 When enabled, the command callback also provides a sequence number for each received byte.
 
#define MTB_PMBUS_IMPL_CMD_REVISION   (1U)
 Enable or disable the automatic response on the PMBUS_REVISION (0x98) command.
 
#define MTB_PMBUS_IMPL_CMD_CAPABILITY   (1U)
 Enable or disable the automatic response on CAPABILITY (0x19) command.
 
#define MTB_PMBUS_IMPL_CMD_QUERY   (1U)
 Enable or disable automatic response on QUERY (0x1A) command.
 
#define MTB_PMBUS_IMPL_CMD_PAGE   (1U)
 Enable or disable automatic response on PAGE (0x00) command.
 
#define MTB_PMBUS_IMPL_CMD_PHASE   (1U)
 Enable or disable automatic response on PHASE (0x04) command.
 
#define MTB_PMBUS_IMPL_CMD_ZONE_CONFIG   (1U)
 Enable or disable automatic response on ZONE_CONFIG (0x07) command.
 
#define MTB_PMBUS_IMPL_CMD_ZONE_ACTIVE   (1U)
 Enable or disable automatic response on ZONE_ACTIVE (0x08) command.
 
#define MTB_PMBUS_IMPL_CMD_PAGE_PLUS_WRITE   (1U)
 Enable or disable automatic response on PAGE_PLUS_WRITE (0x05) command.
 
#define MTB_PMBUS_IMPL_CMD_PAGE_PLUS_READ   (1U)
 Enable or disable automatic response on PAGE_PLUS_READ (0x06) command.
 
#define MTB_PMBUS_IMPL_CMD_P2_PLUS_WRITE   (1U)
 Enable or disable automatic response on P2_PLUS_WRITE (0x09) command.
 
#define MTB_PMBUS_IMPL_CMD_P2_PLUS_READ   (1U)
 Enable or disable automatic response on P2_PLUS_READ (0x0A) command.
 

Macro Definition Documentation

◆ MTB_PMBUS_SUPPORT_PMBUS

#define MTB_PMBUS_SUPPORT_PMBUS   (1U)

Enable or disable PMBus support.

Default: 1U (Enabled)

The APIs will be not available if this option is disabled:

Note
This option must be enabled to use Zone protocols (MTB_PMBUS_SUPPORT_ZONE), Extended commands (MTB_PMBUS_SUPPORT_EXT_CMD), Pages (MTB_PMBUS_PAGES_NUM), Phases (MTB_PMBUS_PHASES_NUM) or any implemented commands. If this option is disabled, all these features must also be disabled (set to 0) to avoid compilation errors.

◆ MTB_PMBUS_SUPPORT_ZONE

#define MTB_PMBUS_SUPPORT_ZONE   (1U)

Enable or disable Zone Write and Zone Read support.

Default: 1U (Enabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_SUPPORT_SMBALERT

#define MTB_PMBUS_SUPPORT_SMBALERT   (1U)

Enable or disable SMBus Alert support.

Default: 1U (Enabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_SUPPORT_HOST_NOTIFY

#define MTB_PMBUS_SUPPORT_HOST_NOTIFY   (0U)

Enable or disable Host Notify Protocol.

Default: 0U (Disabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_CTRL_SUPPORT_HOST_NOTIFY

#define MTB_PMBUS_CTRL_SUPPORT_HOST_NOTIFY   (0U)

Enable or disable Host Notify Protocol to support Controller Host mode.

Default: 0U (Disabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_SUPPORT_GEN_CALL_ADDR

#define MTB_PMBUS_SUPPORT_GEN_CALL_ADDR   (1U)

Enable or disable General Call support.

Default: 1U (Enabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_SUPPORT_EXT_CMD

#define MTB_PMBUS_SUPPORT_EXT_CMD   (0U)

Enable or disable Extended commands.

Default: 0U (Disabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_SUPPORT_PEC

#define MTB_PMBUS_SUPPORT_PEC   (1U)

Enable or disable PEC.

Default: 1U (Enabled)

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_PAGES_NUM

#define MTB_PMBUS_PAGES_NUM   (0x10U)

Set the maximum number of pages.

The valid range is 0x0-0x20. If set to 0x0, the pages are disabled.

Default: 0x10U

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_IMPL_CMD_PAGE_SEL_ADV

#define MTB_PMBUS_IMPL_CMD_PAGE_SEL_ADV   (0U)

When enabled, the application can control the page selection initiated by the controller using the Page callback.

The APIs will be not available if option is disabled:

Default: 0U (Disabled)

◆ MTB_PMBUS_PHASES_NUM

#define MTB_PMBUS_PHASES_NUM   (0x10U)

Set the maximum number of phases.

The valid range is 0x0-0x80. If set to 0x0, the phases are disabled.

Default: 0x10U

The APIs will be not available if this option is disabled:

◆ MTB_PMBUS_IMPL_CMD_PHASE_SEL_ADV

#define MTB_PMBUS_IMPL_CMD_PHASE_SEL_ADV   (0U)

When enabled, the application can control the phase selection initiated by the controller using the Phase callback.

The APIs will be not available if option is disabled:

Default: 0U (Disabled)

◆ MTB_PMBUS_ENABLE_CONFIG_CHECK

#define MTB_PMBUS_ENABLE_CONFIG_CHECK   (1U)

Enable the checking of configuration parameters (recommended only for debug purposes).

The checking of configuration parameters is performed in the mtb_pmbus_init function. Enabling this option will increase the code size.

Default: 1U (Enabled)

◆ MTB_PMBUS_CONFIG_FULL_CHECK

#define MTB_PMBUS_CONFIG_FULL_CHECK   (1U)

Define the level of the configuration parameter checking: 0U: Minimal checking, only critical parameters (e.g., to avoid hard faults).

1U: Full checking, includes all parameter validations.

Default: 1U (Full checking)

◆ MTB_PMBUS_ZONE_MAX_NUM

#define MTB_PMBUS_ZONE_MAX_NUM   (0x7FU)

Define the range for Zone values.

By default, the range 0x00 - 0x7FU is used for normal active zones. But the range can be extended by redefining this macro to cover the reserved for PMBus product manufacturer's values up to 0xBF.

Default: 0x7FU

◆ MTB_PMBUS_ZONE_SEL_ADV

#define MTB_PMBUS_ZONE_SEL_ADV   (0U)

When enabled, the application can control the zone selection initiated by the controller using the Zone callback.

The APIs will be not available if option is disabled:

Default: 0U (Disabled)

◆ MTB_PMBUS_ENABLE_CMD_CALLBACK_ADV

#define MTB_PMBUS_ENABLE_CMD_CALLBACK_ADV   (0U)

When enabled, the command callback also provides a sequence number for each received byte.

This option only applies to the following event:

Default: 0U (Disabled)

◆ MTB_PMBUS_IMPL_CMD_REVISION

#define MTB_PMBUS_IMPL_CMD_REVISION   (1U)

Enable or disable the automatic response on the PMBUS_REVISION (0x98) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

◆ MTB_PMBUS_IMPL_CMD_CAPABILITY

#define MTB_PMBUS_IMPL_CMD_CAPABILITY   (1U)

Enable or disable the automatic response on CAPABILITY (0x19) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

◆ MTB_PMBUS_IMPL_CMD_QUERY

#define MTB_PMBUS_IMPL_CMD_QUERY   (1U)

Enable or disable automatic response on QUERY (0x1A) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

◆ MTB_PMBUS_IMPL_CMD_PAGE

#define MTB_PMBUS_IMPL_CMD_PAGE   (1U)

Enable or disable automatic response on PAGE (0x00) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_PAGES_NUM must be greater than 0 to use this command.

◆ MTB_PMBUS_IMPL_CMD_PHASE

#define MTB_PMBUS_IMPL_CMD_PHASE   (1U)

Enable or disable automatic response on PHASE (0x04) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_PHASES_NUM must be greater than 0 to use this command.

◆ MTB_PMBUS_IMPL_CMD_ZONE_CONFIG

#define MTB_PMBUS_IMPL_CMD_ZONE_CONFIG   (1U)

Enable or disable automatic response on ZONE_CONFIG (0x07) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_SUPPORT_ZONE must be enabled to use this command.

◆ MTB_PMBUS_IMPL_CMD_ZONE_ACTIVE

#define MTB_PMBUS_IMPL_CMD_ZONE_ACTIVE   (1U)

Enable or disable automatic response on ZONE_ACTIVE (0x08) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_SUPPORT_ZONE must be enabled to use this command.

◆ MTB_PMBUS_IMPL_CMD_PAGE_PLUS_WRITE

#define MTB_PMBUS_IMPL_CMD_PAGE_PLUS_WRITE   (1U)

Enable or disable automatic response on PAGE_PLUS_WRITE (0x05) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_PAGES_NUM must be greater than 0 to use this command.

◆ MTB_PMBUS_IMPL_CMD_PAGE_PLUS_READ

#define MTB_PMBUS_IMPL_CMD_PAGE_PLUS_READ   (1U)

Enable or disable automatic response on PAGE_PLUS_READ (0x06) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
MTB_PMBUS_PAGES_NUM must be greater than 0 to use this command.

◆ MTB_PMBUS_IMPL_CMD_P2_PLUS_WRITE

#define MTB_PMBUS_IMPL_CMD_P2_PLUS_WRITE   (1U)

Enable or disable automatic response on P2_PLUS_WRITE (0x09) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
Both MTB_PMBUS_PAGES_NUM and MTB_PMBUS_PHASES_NUM must be greater than 0 to use this command.

◆ MTB_PMBUS_IMPL_CMD_P2_PLUS_READ

#define MTB_PMBUS_IMPL_CMD_P2_PLUS_READ   (1U)

Enable or disable automatic response on P2_PLUS_READ (0x0A) command.

Default: 1U (Enabled)

Also, enable this command in the run-time configuration: mtb_pmbus_stc_config_t::impl_cmd_mask

Note
Both MTB_PMBUS_PAGES_NUM and MTB_PMBUS_PHASES_NUM must be greater than 0 to use this command.