comparison Discovery/Src/stm32f4xx_hal_msp_hw2.c @ 130:b7689d9e888a FlipDisplay

Minor changes to improved code quality and to eliminate warnings
author Ideenmodellierer
date Sun, 17 Feb 2019 21:22:13 +0100
parents 626191e1fed1
children 879709909dd6
comparison
equal deleted inserted replaced
129:239aa58b533d 130:b7689d9e888a
391 PF9 ------> SPI5_MOSI 391 PF9 ------> SPI5_MOSI
392 */ 392 */
393 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9; 393 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9;
394 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 394 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
395 GPIO_InitStruct.Pull = GPIO_NOPULL; 395 GPIO_InitStruct.Pull = GPIO_NOPULL;
396 GPIO_InitStruct.Speed = /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */ 396 GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */
397 GPIO_InitStruct.Alternate = GPIO_AF5_SPI5; 397 GPIO_InitStruct.Alternate = GPIO_AF5_SPI5;
398 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct); 398 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
399 399
400 /* USER CODE BEGIN SPI5_MspInit 1 */ 400 /* USER CODE BEGIN SPI5_MspInit 1 */
401 401
500 TIMx_CLK_ENABLE(); 500 TIMx_CLK_ENABLE();
501 501
502 HAL_NVIC_SetPriority(TIMx_IRQn, 2, 1); 502 HAL_NVIC_SetPriority(TIMx_IRQn, 2, 1);
503 HAL_NVIC_EnableIRQ(TIMx_IRQn); 503 HAL_NVIC_EnableIRQ(TIMx_IRQn);
504 } 504 }
505 #ifdef DEMOMODE
505 if(htim_base->Instance==TIM7) 506 if(htim_base->Instance==TIM7)
506 { 507 {
507 __TIM7_CLK_ENABLE(); 508 __TIM7_CLK_ENABLE();
508 509
509 HAL_NVIC_SetPriority(TIM7_IRQn, 2, 0); 510 HAL_NVIC_SetPriority(TIM7_IRQn, 2, 0);
510 HAL_NVIC_EnableIRQ(TIM7_IRQn); 511 HAL_NVIC_EnableIRQ(TIM7_IRQn);
511 } 512 }
513 #endif
512 } 514 }
513 515
514 void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* htim_pwm) 516 void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* htim_pwm)
515 { 517 {
516 518