genvif: made default missing PID/TID 0xFFFF
BRANCH=none
TEST=verify XML output
Tested-by: Denis Brockus
#define VIF_APP_VERSION_VALUE "3.0.0.5"
#define VENDOR_NAME_VALUE "Google"
+#define DEFAULT_MISSING_TID 0xFFFF
+#define DEFAULT_MISSING_PID 0xFFFF
const uint32_t *src_pdo;
uint32_t src_pdo_cnt;
@@ -1055,10 +1057,10 @@ static int gen_vif(const char *name,
NULL,
CONFIG_USB_PD_TID);
#else
- set_vif_field(&vif_fields[TID],
+ set_vif_field_stis(&vif_fields[TID],
"TID",
NULL,
- "12345");
+ DEFAULT_MISSING_TID);
#endif
set_vif_field(&vif_fields[VIF_Product_Type],
@@ -1315,16 +1317,23 @@ static int gen_vif(const char *name,
"Manufacturer_Info_Supported_Port",
IS_ENABLED(CONFIG_USB_PD_MANUFACTURER_INFO));
- #if defined(CONFIG_USB_PID)
{
char hex_str[10];
+ #if defined(CONFIG_USB_PID)
sprintf(hex_str, "%04X", CONFIG_USB_PID);
- set_vif_field_itss(&vif_fields[Manufacturer_Info_PID_Port],
+ set_vif_field_itss(&vif_fields[
+ Manufacturer_Info_PID_Port],
"Manufacturer_Info_PID_Port",
CONFIG_USB_PID, hex_str);
- }
+ #else
+ sprintf(hex_str, "%04X", DEFAULT_MISSING_PID);
+ set_vif_field_itss(&vif_fields[
+ Manufacturer_Info_PID_Port],
+ "Manufacturer_Info_PID_Port",
+ DEFAULT_MISSING_PID, hex_str);
#endif
+ }
set_vif_field_b(&vif_fields[Security_Msgs_Supported_SOP],
"Security_Msgs_Supported_SOP",
