mtb-pmbus
Data Structures

General Description

Data Structures

struct  mtb_pmbus_stc_config_cmd_t
 Command configuration structure. More...
 
struct  mtb_pmbus_stc_config_hw_t
 Hardware configuration structure. More...
 
struct  mtb_pmbus_stc_config_t
 Configuration structure. More...
 
struct  mtb_pmbus_stc_t
 Instance structure. More...
 

Typedefs

typedef void(* mtb_pmbus_handle_events_t) (mtb_pmbus_events_t event)
 Provides the typedef for the callback function called in ISR to notify the user about occurrences of mtb_pmbus_events_t.
 
typedef void(* mtb_pmbus_handle_error_events_t) (uint32_t events, uint8_t cmd_code, bool cmd_is_ext)
 Provides the typedef for the callback function called in ISR to notify the user about the occurrences of error events.
 
typedef bool(* mtb_pmbus_handle_cmd_events_t) (mtb_pmbus_cmd_events_t event, int32_t page, int32_t phase, uint8_t byte)
 Provides the typedef for the callback function called in ISR to notify the user about occurrences of mtb_pmbus_events_t.
 
typedef uint8_t(* mtb_pmbus_handle_zone_events_t) (mtb_pmbus_zone_events_t event, uint8_t data_byte, int32_t page)
 Provides the typedef for the callback function called in ISR to notify the user about occurrences of mtb_pmbus_zone_events_t.
 
typedef void(* mtb_pmbus_hw_resources_ctrl_t) (mtb_pmbus_hw_resources_ctrl_action_t action)
 Provides the typedef for the callback function called in mtb_pmbus_enable and mtb_pmbus_disable to perform enabling/disabling HW resources.
 
typedef void(* mtb_pmbus_hw_isr_ctrl_t) (void)
 Provides the typedef for the callback function called inside the middleware to enable/disable PMBus related interrupts.
 

Data Structure Documentation

◆ mtb_pmbus_stc_config_cmd_t

struct mtb_pmbus_stc_config_cmd_t
Data Fields
uint8_t cmd_code Command code.
uint16_t cmd_cap Command capabilities, see Command capabilities macro.
void * data_buf The pointer to command data buffer.
uint8_t data_size The command data size.
mtb_pmbus_handle_cmd_events_t callback Command callback.

◆ mtb_pmbus_stc_config_hw_t

struct mtb_pmbus_stc_config_hw_t
Data Fields
mtb_pmbus_stc_config_hal_t * hal_config The pointer to HAL configuration structure, see mtb_pmbus_stc_config_hal_t.
mtb_pmbus_hw_resources_ctrl_t hw_resource_ctrl_callback The pointer to the user callback for enabling/disabling the I2C Hardware.
mtb_pmbus_hw_isr_ctrl_t enable_hw_irq_callback The pointer to the user callback for enabling I2C HW interrupts.
mtb_pmbus_hw_isr_ctrl_t disable_hw_irq_callback The pointer to the user callback for disabling I2C HW interrupts.

◆ mtb_pmbus_stc_config_t

struct mtb_pmbus_stc_config_t
Data Fields
mtb_pmbus_stc_config_hw_t * hw_config Pointer to hardware configuration structure.
uint8_t address Target address.
bool enable_pec Enable PEC support.
  • With PEC enabled, the middleware can handle the protocols with or without PEC.
    Note
    If the received and calculated PEC bytes do not match, the middleware sends NACK to PEC byte
  • With PEC disabled, the middleware supports only protocols without PEC.
    Note
    This field is only available when MTB_PMBUS_SUPPORT_PEC is enabled at compile time options.
bool enable_smbalert Enable SMBALERT signal.
Note
This field is only available when MTB_PMBUS_SUPPORT_SMBALERT is enabled at compile time options.
bool enable_gen_call_addr Enable General Call address handling.
Note
This field is only available when MTB_PMBUS_SUPPORT_GEN_CALL_ADDR is enabled at compile time options.
bool enable_pmbus Enable PMBus support.

If this option is disabled, only SMBUS features are supported

Note
This field is only available when MTB_PMBUS_SUPPORT_PMBUS is enabled at compile time options.
uint8_t num_pages The total number of pages.

If set to 0, the pages are not supported

Note
This field is only available when MTB_PMBUS_PAGES_NUM is greater than 0U at compile time options.
uint8_t num_phases The total number of phases.

If set to 0, the phases are not supported

Note
This field is only available when MTB_PMBUS_PHASES_NUM is greater than 0U at compile time options.
bool enable_zone Enable Zone Write and Zone Read protocols.
Note
This field is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
mtb_pmbus_handle_zone_events_t zone_callback The pointer to the user callback for zone protocol.
Note
This field is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
uint32_t impl_cmd_mask List of implemented commands.

Use this field to define the list of the implemented commands Implemented Commands macro

Note
This field is only available when at least one preimplemented command is enabled at compile time options.
mtb_pmbus_stc_config_cmd_t * cmd_table The pointer to commands table.
uint8_t cmd_num Number of defined commands in commands table
mtb_pmbus_handle_events_t gen_callback The pointer to the user callback for general events.
mtb_pmbus_handle_error_events_t errors_callback The pointer to the user callback for error events.
mtb_pmbus_revision_t revision Revision of PMBus specification.
Note
This field is only available when MTB_PMBUS_IMPL_CMD_REVISION is enabled at compile time options.
mtb_pmbus_speed_t speed The maximum supported speed.
Note
This field is only available when MTB_PMBUS_IMPL_CMD_CAPABILITY is enabled at compile time options.
bool enable_ieee_format If enabled the Numeric data is in IEEE Half Precision Floating Point Format, otherwise in LINEAR11, ULINEAR16 or DIRECT formats.
Note
This field is only available when MTB_PMBUS_IMPL_CMD_CAPABILITY is enabled at compile time options.

◆ mtb_pmbus_stc_t

struct mtb_pmbus_stc_t