초보의 아웅다웅 설계하기/STM32
STM --cpp 옵션으로 인한 에러
로망와니
2023. 2. 8. 07:46
C로 컴파일 할 때는 이상없이 되다가 --cpp 옵션을 넣을 경우 에러가 발생
error: #167: argument of type "void *" is incompatible with parameter of type "xxxxxxxxxxxxxxxxx *"
void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd)
{
USBH_LL_IncTimer(hhcd->pData); /* void USBH_LL_IncTimer(USBH_HandleTypeDef *phost); */
}
=>
void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd)
{
USBH_LL_IncTimer((USBH_HandleTypeDef *)(hhcd->pData));
}