/* SPI MSP De-Initialization This function freeze the hardware resources used in this example.  */
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
/* SPI MSP De-Initialization This function freeze the hardware resources used in this example.  */
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
{
  if(hspi->Instance==SPI1)
  {
    __HAL_RCC_SPI1_CLK_DISABLE();
    HAL_GPIO_DeInit(GPIOB, ARD_D12_Pin|ARD_D11_Pin);
    HAL_GPIO_DeInit(GPIOA, ARD_D10_Pin|ARD_D13_Pin);
  }
  else if(hspi->Instance==SPI2)
  {
    __HAL_RCC_SPI2_CLK_DISABLE();
    HAL_GPIO_DeInit(GPIOI, SPI2_MISO_Pin|SPI2_CLK_Pin);
    HAL_GPIO_DeInit(SPI2_MOSI_GPIO_Port, SPI2_MOSI_Pin);
  }
}