mtb-pmbus
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. More...
 
bool mtb_pmbus_is_busy (mtb_pmbus_stc_t *inst)
 Checks if the PMBus instance is currently busy. More...
 

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_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.