mtb-pmbus
Hardware Specific APIs

General Description

Data Structures

struct  mtb_pmbus_stc_config_hal_t
 HAL Configuration structure. More...
 

Macros

#define MTB_PMBUS_HAL_STATUS_SUCCESS   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 0U)
 Wrapper over Correct status, No error.
 
#define MTB_PMBUS_HAL_STATUS_INVALID_CMD_CODE   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 1U)
 Wrapper over status provided command code is incorrect.
 
#define MTB_PMBUS_HAL_STATUS_INVALID_PAGE   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 2U)
 Wrapper over status provided page is incorrect.
 
#define MTB_PMBUS_HAL_STATUS_INVALID_PHASE   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 3U)
 Wrapper over status provided phase is incorrect.
 
#define MTB_PMBUS_HAL_STATUS_BAD_PARAM   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 4U)
 Wrapper over status one or more of input parameters are invalid.
 
#define MTB_PMBUS_HAL_STATUS_TOO_MANY_BYTES   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 5U)
 Wrapper over status requested size is bigger than command size.
 
#define MTB_PMBUS_HAL_STATUS_CMD_IS_ACTIVE   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 6U)
 Wrapper over status requested action is aborted for the command as this command takes part in communication.
 
#define MTB_PMBUS_HAL_STATUS_IS_BUSY   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_MIDDLEWARE_PMBUS, 7U)
 Wrapper over status requested action is aborted as the PMBus instance takes part in communication.
 
#define MTB_PMBUS_HAL_USE_TCPWM   (1U)
 Use one of the TCPWM counters for the timeout detection.
 

Data Structure Documentation

◆ mtb_pmbus_stc_config_hal_t

struct mtb_pmbus_stc_config_hal_t
Data Fields
CySCB_Type * hw_ptr The pointer to SCB.
cy_stc_scb_i2c_context_t * pdl_i2c_context The pointer to I2C driver context structure.
TCPWM_Type * timeout_tcpwm_base The pointer to TCPWM object.
Note
This field is only available when MTB_PMBUS_ENABLE_TIMEOUT and MTB_PMBUS_HAL_USE_TCPWM are enabled at compile time options.
uint32_t timeout_tcpwm_cntnum The number of TCPWM counter used for timeout detection.
Note
This field is only available when MTB_PMBUS_ENABLE_TIMEOUT and MTB_PMBUS_HAL_USE_TCPWM are enabled at compile time options.
GPIO_PRT_Type * smbalert_port_addr The pointer to GPIO port for SMBALERT signal.
Note
This field is only available when MTB_PMBUS_SUPPORT_SMBALERT is enabled at compile time options.
uint32_t smbalert_pin_num The pin number of GPIO port for SMBALERT signal.
Note
This field is only available when MTB_PMBUS_SUPPORT_SMBALERT is enabled at compile time options.
uint8_t * hal_read_buf_ptr The read buffer for Controller.
uint16_t hal_read_buf_size The size of read buffer.
uint8_t hal_write_buf[MTB_PMBUS_HAL_WRITE_BUF_SIZE] The write buffer for Controller.