mtb-pmbus 1.2.0.1772
 
Loading...
Searching...
No Matches
Miscellaneous Functions

General Description

Functions

void mtb_pmbus_set_received_byte (mtb_pmbus_stc_t *inst, uint8_t byte)
 Set the data byte for the Receive Byte protocol.
 
mtb_pmbus_status_t mtb_pmbus_send_host_notify (mtb_pmbus_stc_t *inst, uint32_t data)
 Notifies an error to PMBus host as defined by Host Notify Protocol(HNP).
 
bool mtb_pmbus_is_busy (mtb_pmbus_stc_t *inst)
 Checks if the PMBus instance is currently busy.
 

Function Documentation

◆ mtb_pmbus_set_received_byte()

void mtb_pmbus_set_received_byte ( mtb_pmbus_stc_t * inst,
uint8_t byte )

Set the data byte for the Receive Byte protocol.

The middleware will automatically send this byte when it is requested by the controller.

Note
If the Quick Command with Read direction and Received Byte protocols must be used in the same application, set the first bit of the data byte to 1. See Communication Protocols for more information.
Parameters
instThe pointer to the PMBus instance structure
byteThe byte to send

◆ mtb_pmbus_send_host_notify()

mtb_pmbus_status_t mtb_pmbus_send_host_notify ( mtb_pmbus_stc_t * inst,
uint32_t data )

Notifies an error to PMBus host as defined by Host Notify Protocol(HNP).

It starts data transmission to the host as a controller device. During transmission, the PMBus instance becomes unavailable for operations as target. To check transmission results, use mtb_pmbus_handle_host_notify_t callback.

Note
It needs specific hardware settings. Refer to SCB I2C Configuration
Parameters
instThe pointer to the PMBus instance structure
dataThe data to send
Note
Only lower 16 bits are used.
Returns
mtb_pmbus_status_t

◆ mtb_pmbus_is_busy()

bool mtb_pmbus_is_busy ( mtb_pmbus_stc_t * inst)

Checks if the PMBus instance is currently busy.

This function determines whether the specified PMBus instance is engaged in communication. The busy status is set once the PMBus instance receives any of the supported addresses (Own Target Address, Alert Response Address, etc.) and cleared after a STOP condition. Use this function together with mtb_pmbus_disable to avoid disabling the PMBus instance during active communication and to prevent bus errors.

Parameters
instPointer to the PMBus instance structure
Returns
true if the PMBus instance is busy; false otherwise.