summaryrefslogtreecommitdiff
path: root/bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c')
-rw-r--r--bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c b/bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c
index 0b02774..5ee7f9a 100644
--- a/bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c
+++ b/bsp/radio-controller-1/Src/stm32f1xx_hal_msp.c
@@ -44,8 +44,6 @@
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"
-extern DMA_HandleTypeDef hdma_tim1_ch1;
-
extern void Error_Handler(void);
/* USER CODE BEGIN 0 */
@@ -88,11 +86,11 @@ void HAL_MspInit(void)
/* USER CODE END MspInit 1 */
}
-void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* htim_ic)
+void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
GPIO_InitTypeDef GPIO_InitStruct;
- if(htim_ic->Instance==TIM1)
+ if(htim_base->Instance==TIM1)
{
/* USER CODE BEGIN TIM1_MspInit 0 */
@@ -108,23 +106,6 @@ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* htim_ic)
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(RADIO_RX_GPIO_Port, &GPIO_InitStruct);
- /* Peripheral DMA init*/
-
- hdma_tim1_ch1.Instance = DMA1_Channel2;
- hdma_tim1_ch1.Init.Direction = DMA_PERIPH_TO_MEMORY;
- hdma_tim1_ch1.Init.PeriphInc = DMA_PINC_DISABLE;
- hdma_tim1_ch1.Init.MemInc = DMA_MINC_ENABLE;
- hdma_tim1_ch1.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
- hdma_tim1_ch1.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
- hdma_tim1_ch1.Init.Mode = DMA_NORMAL;
- hdma_tim1_ch1.Init.Priority = DMA_PRIORITY_LOW;
- if (HAL_DMA_Init(&hdma_tim1_ch1) != HAL_OK)
- {
- Error_Handler();
- }
-
- __HAL_LINKDMA(htim_ic,hdma[TIM_DMA_ID_CC1],hdma_tim1_ch1);
-
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(TIM1_TRG_COM_IRQn, 1, 0);
HAL_NVIC_EnableIRQ(TIM1_TRG_COM_IRQn);
@@ -137,10 +118,10 @@ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* htim_ic)
}
-void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef* htim_ic)
+void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
- if(htim_ic->Instance==TIM1)
+ if(htim_base->Instance==TIM1)
{
/* USER CODE BEGIN TIM1_MspDeInit 0 */
@@ -153,9 +134,6 @@ void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef* htim_ic)
*/
HAL_GPIO_DeInit(RADIO_RX_GPIO_Port, RADIO_RX_Pin);
- /* Peripheral DMA DeInit*/
- HAL_DMA_DeInit(htim_ic->hdma[TIM_DMA_ID_CC1]);
-
/* Peripheral interrupt DeInit*/
HAL_NVIC_DisableIRQ(TIM1_TRG_COM_IRQn);