mtb-pmbus
Zone Functions

General Description

Functions

mtb_pmbus_status_t mtb_pmbus_get_read_zone (mtb_pmbus_stc_t *inst, uint32_t *zone, uint32_t page)
 Returns assigned Read Zone to this target device. More...
 
mtb_pmbus_status_t mtb_pmbus_get_write_zone (mtb_pmbus_stc_t *inst, uint32_t *zone, uint32_t page)
 Returns assigned Write Zone to this target device. More...
 
mtb_pmbus_status_t mtb_pmbus_get_active_zones (mtb_pmbus_stc_t *inst, uint32_t *zone_read, uint32_t *zone_write)
 Returns the active zones. More...
 
mtb_pmbus_status_t mtb_pmbus_set_default_zones (mtb_pmbus_stc_t *inst, uint32_t zone_read, uint32_t zone_write, uint32_t page)
 Sets the default zones for the device. More...
 

Function Documentation

◆ mtb_pmbus_get_read_zone()

mtb_pmbus_status_t mtb_pmbus_get_read_zone ( mtb_pmbus_stc_t inst,
uint32_t *  zone,
uint32_t  page 
)

Returns assigned Read Zone to this target device.

If the instance does not support pages, then the page parameter is ignored and the function returns the global zones assigned to this instance.

Note
This function is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
Parameters
instThe pointer to the PMBus instance structure
zoneThe pointer to variable for storing the Read Zone
pageThe page number for zone assignment
Returns
mtb_pmbus_status_t

◆ mtb_pmbus_get_write_zone()

mtb_pmbus_status_t mtb_pmbus_get_write_zone ( mtb_pmbus_stc_t inst,
uint32_t *  zone,
uint32_t  page 
)

Returns assigned Write Zone to this target device.

If the instance does not support pages, then the page parameter is ignored and the function returns the global zones assigned to this instance.

Note
This function is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
Parameters
instThe pointer to the PMBus instance structure
zoneThe pointer to variable for storing the Write Zone
pageThe page number for zone assignment
Returns
mtb_pmbus_status_t

◆ mtb_pmbus_get_active_zones()

mtb_pmbus_status_t mtb_pmbus_get_active_zones ( mtb_pmbus_stc_t inst,
uint32_t *  zone_read,
uint32_t *  zone_write 
)

Returns the active zones.

Note
This function is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
Parameters
instThe pointer to the PMBus instance structure
zone_readThe pointer to variable for storing the active Read Zone
zone_writeThe pointer to variable for storing the active Write Zone
Returns
mtb_pmbus_status_t

◆ mtb_pmbus_set_default_zones()

mtb_pmbus_status_t mtb_pmbus_set_default_zones ( mtb_pmbus_stc_t inst,
uint32_t  zone_read,
uint32_t  zone_write,
uint32_t  page 
)

Sets the default zones for the device.

Use this function to change the default zones during the initialization of the device: after mtb_pmbus_init() and before mtb_pmbus_enable().

By default the 0xFE is assigned to Read and Write Zones during initialization stage.

If instance does not support pages, then the page parameter value is ignored and zones are assigned globally for instance.

Note
This function is only available when MTB_PMBUS_SUPPORT_ZONE is enabled at compile time options.
Warning
This function does not check for invalid zone values. This is done for flexibility purposes, as there are several ranges of zone values.
Parameters
instThe pointer to the PMBus instance structure
zone_readThe Read Zone to assign to this device
zone_writeThe Write Zone to assign to this device
pageThe page number for zone assignment
Returns
mtb_pmbus_status_t