diff --git a/stm32f0xx_hal_msp.c b/stm32f0xx_hal_msp.c --- a/stm32f0xx_hal_msp.c +++ b/stm32f0xx_hal_msp.c @@ -57,33 +57,25 @@ void HAL_MspInit(void) /* USER CODE END MspInit 1 */ } +/* void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) { GPIO_InitTypeDef GPIO_InitStruct; if(hspi->Instance==SPI1) { - /* USER CODE BEGIN SPI1_MspInit 0 */ - - /* USER CODE END SPI1_MspInit 0 */ - /* Peripheral clock enable */ __SPI1_CLK_ENABLE(); - /**SPI1 GPIO Configuration - PA5 ------> SPI1_SCK - PA6 ------> SPI1_MISO - PA7 ------> SPI1_MOSI - */ + // SPI1 GPIO Configuration + // PA5 ------> SPI1_SCK + // PA6 ------> SPI1_MISO + // PA7 ------> SPI1_MOSI GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_LOW; GPIO_InitStruct.Alternate = GPIO_AF0_SPI1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN SPI1_MspInit 1 */ - - /* USER CODE END SPI1_MspInit 1 */ } } @@ -93,25 +85,19 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef if(hspi->Instance==SPI1) { - /* USER CODE BEGIN SPI1_MspDeInit 0 */ - - /* USER CODE END SPI1_MspDeInit 0 */ - /* Peripheral clock disable */ + // Peripheral clock disable __SPI1_CLK_DISABLE(); - /**SPI1 GPIO Configuration - PA5 ------> SPI1_SCK - PA6 ------> SPI1_MISO - PA7 ------> SPI1_MOSI - */ + //SPI1 GPIO Configuration + // PA5 ------> SPI1_SCK + // PA6 ------> SPI1_MISO + // PA7 ------> SPI1_MOSI HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); - /* USER CODE BEGIN SPI1_MspDeInit 1 */ - - /* USER CODE END SPI1_MspDeInit 1 */ } } +*/ /* USER CODE BEGIN 1 */