ST32 I-cube サンプル コードを使用して、次のコードで ADC を開始しようとしています。
ADC_HandleTypeDef hadc;
void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) {
if(hadc->Instance==ADC){
GPIO_InitTypeDef GPIO_InitStruct={0};
/*##-1- Enable peripherals and GPIO Clocks #################################*/
/* Enable GPIO clock ****************************************/
__HAL_RCC_GPIOA_CLK_ENABLE();
/* ADC1 Periph clock enable */
/*##- 2- Configure peripheral GPIO #########################################*/
/* ADC3 Channel8 GPIO pin configuration */
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
.........
}
コンパイラは、次の行で「個別のポインター型の比較にはキャストがありません」という警告を出しています。
if(hadc->Instance==ADC){
私は何を間違っていますか?
助けてくれてありがとう!