STM32G071RB USBPD Sink with X-NUCLEO-USBPDM1 4 Errors after code-generation following example
I have tried to follow this example:
Sadly right after code-generation there are already 4 errors without me adding the code as instructed in the document.
In usbpd_dpm_usr.c:
USBPD_StatusTypeDef USBPD_DPM_EvaluateDataRoleSwap(uint8_t PortNum)
{
/* USER CODE BEGIN USBPD_DPM_EvaluateDataRoleSwap */
USBPD_StatusTypeDef status = USBPD_REJECT;
if ((USBPD_TRUE == DPM_USER_Settings[PortNum].PE_DataSwap)
&& (((USBPD_TRUE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_DFP) && (USBPD_PORTDATAROLE_UFP == DPM_Params[PortNum].PE_DataRole))
|| ((USBPD_TRUE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_UFP) && (USBPD_PORTDATAROLE_DFP == DPM_Params[PortNum].PE_DataRole)))))
{
status = USBPD_ACCEPT;
}
return status;
/* USER CODE END USBPD_DPM_EvaluateDataRoleSwap */
}
results in 4 Errors. Specifically PE_DR_Swap_To_DFP and PE_DR_Swap_To_UFP do not seem to be named members of USBPD_USER_SettingsTypeDef.
After some searching I found that in gui_api.h really had no such members in USBPD_USER_SettingsTypeDef.
I am using the STM32CubeIDE Version 1.4.1, and have checked for all relevant updates I could find. In addition I tried using STM32CubeMX as shown in the document and the IAR IDE, which resulted in the same problem.
I would really appreciate getting some help from the community to get this example running.
