enable spi interrupt

This commit is contained in:
2020-11-05 13:27:57 +01:00
parent 78ff38043e
commit 019f1b5cd0
8 changed files with 97 additions and 60 deletions

View File

@ -151,6 +151,9 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(EEPROM_MISO_GPIO_Port, &GPIO_InitStruct);
/* SPI2 interrupt Init */
HAL_NVIC_SetPriority(SPI2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(SPI2_IRQn);
/* USER CODE BEGIN SPI2_MspInit 1 */
/* USER CODE END SPI2_MspInit 1 */
@ -222,6 +225,8 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
*/
HAL_GPIO_DeInit(GPIOB, EEPROM_SCLK_Pin|EEPROM_MISO_Pin|EEPROM_MOSI_Pin);
/* SPI2 interrupt Deinit */
HAL_NVIC_DisableIRQ(SPI2_IRQn);
/* USER CODE BEGIN SPI2_MspDeInit 1 */
/* USER CODE END SPI2_MspDeInit 1 */