@@ -541,31 +541,31 @@ __weak void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params)
541541 map ++ ;
542542 }
543543#else
544- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d0 ), STM_GPIO_PIN (SD_PinNames .pin_d0 ));
545- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d1 ), STM_GPIO_PIN (SD_PinNames .pin_d1 ));
546- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d2 ), STM_GPIO_PIN (SD_PinNames .pin_d2 ));
547- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d3 ), STM_GPIO_PIN (SD_PinNames .pin_d3 ));
548- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_cmd ), STM_GPIO_PIN (SD_PinNames .pin_cmd ));
549- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_ck ), STM_GPIO_PIN (SD_PinNames .pin_ck ));
544+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d0 ) ), STM_GPIO_PIN (SD_PinNames .pin_d0 ));
545+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d1 ) ), STM_GPIO_PIN (SD_PinNames .pin_d1 ));
546+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d2 ) ), STM_GPIO_PIN (SD_PinNames .pin_d2 ));
547+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d3 ) ), STM_GPIO_PIN (SD_PinNames .pin_d3 ));
548+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_cmd ) ), STM_GPIO_PIN (SD_PinNames .pin_cmd ));
549+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_ck ) ), STM_GPIO_PIN (SD_PinNames .pin_ck ));
550550#if defined(SDMMC1 ) || defined(SDMMC2 )
551551#if !defined(SDMMC_CKIN_NA )
552552 if (SD_PinNames .pin_ckin != NC ) {
553- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_ckin ), STM_GPIO_PIN (SD_PinNames .pin_ckin ));
553+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_ckin ) ), STM_GPIO_PIN (SD_PinNames .pin_ckin ));
554554 }
555555#endif
556556#if !defined(SDMMC_CDIR_NA )
557557 if (SD_PinNames .pin_cdir != NC ) {
558- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_cdir ), STM_GPIO_PIN (SD_PinNames .pin_cdir ));
558+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_cdir ) ), STM_GPIO_PIN (SD_PinNames .pin_cdir ));
559559 }
560560#endif
561561#if !defined(SDMMC_D0DIR_NA )
562562 if (SD_PinNames .pin_d0dir != NC ) {
563- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d0dir ), STM_GPIO_PIN (SD_PinNames .pin_d0dir ));
563+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d0dir ) ), STM_GPIO_PIN (SD_PinNames .pin_d0dir ));
564564 }
565565#endif
566566#if !defined(SDMMC_D123DIR_NA )
567567 if (SD_PinNames .pin_d123dir != NC ) {
568- HAL_GPIO_DeInit ((GPIO_TypeDef * )STM_PORT (SD_PinNames .pin_d123dir ), STM_GPIO_PIN (SD_PinNames .pin_d123dir ));
568+ HAL_GPIO_DeInit ((GPIO_TypeDef * )get_GPIO_Port ( STM_PORT (SD_PinNames .pin_d123dir ) ), STM_GPIO_PIN (SD_PinNames .pin_d123dir ));
569569 }
570570#endif
571571#endif /* SDMMC1 || SDMMC2 */
0 commit comments