/* It sets the VBus monitoring reference voltage as well as the upper and lower tolerance threshold.  */
USBPD_StatusTypeDef STUSB16xx_HW_IF_Set_VBus_Monitoring(uint8_t PortNum, uint16_t VBus, uint8_t Hset, uint8_t Lset)
/* It sets the VBus monitoring reference voltage as well as the upper and lower tolerance threshold.  */
USBPD_StatusTypeDef STUSB16xx_HW_IF_Set_VBus_Monitoring(uint8_t PortNum, uint16_t VBus, uint8_t Hset, uint8_t Lset)
{
  USBPD_StatusTypeDef ret = USBPD_ERROR;
  if (Hset > 15) Hset = 15;
  if (Lset > 15) Lset = 15;
  ret = (USBPD_StatusTypeDef)STUSB1602_VBUS_Select_Status_Set(STUSB1602_I2C_Add(PortNum), VBus);
  ret = (USBPD_StatusTypeDef)STUSB1602_VBUS_VShift_High_Set(STUSB1602_I2C_Add(PortNum), Hset);
  ret = (USBPD_StatusTypeDef)STUSB1602_VBUS_VShift_Low_Set(STUSB1602_I2C_Add(PortNum), Lset);
  return ret;
}