Page 183 - MDP2022-2
P. 183

if  (HAL_I2CEx_ConfigAnalogFilter(&hi2c2,  I2C_ANALOGFILTER_ENABLE)  !=  HAL_OK)
                {
                    Error_Handler();
                }


                /**  Configure  Digital  filter
                */
                if  (HAL_I2CEx_ConfigDigitalFilter(&hi2c2,  0)  !=  HAL_OK)
                {
                    Error_Handler();
                }
                /*  USER  CODE  BEGIN  I2C2_Init  2  */


                /*  USER  CODE  END  I2C2_Init  2  */


            }


            /**
                *  @brief  TIM1  Initialization  Function
                *  @param  None
                *  @retval  None
                */
            static  void  MX_TIM1_Init(void)
            {


                /*  USER  CODE  BEGIN  TIM1_Init  0  */


                /*  USER  CODE  END  TIM1_Init  0  */


                TIM_ClockConfigTypeDef  sClockSourceConfig  =  {0};
                TIM_MasterConfigTypeDef  sMasterConfig  =  {0};
                TIM_OC_InitTypeDef  sConfigOC  =  {0};
                TIM_BreakDeadTimeConfigTypeDef  sBreakDeadTimeConfig  =  {0};


                /*  USER  CODE  BEGIN  TIM1_Init  1  */


                /*  USER  CODE  END  TIM1_Init  1  */
                htim1.Instance  =  TIM1;
                htim1.Init.Prescaler  =  0;
                htim1.Init.CounterMode  =  TIM_COUNTERMODE_UP;
                htim1.Init.Period  =  71;
                htim1.Init.ClockDivision  =  TIM_CLOCKDIVISION_DIV1;
                htim1.Init.RepetitionCounter  =  0;
                htim1.Init.AutoReloadPreload  =  TIM_AUTORELOAD_PRELOAD_DISABLE;
                if  (HAL_TIM_Base_Init(&htim1)  !=  HAL_OK)
   178   179   180   181   182   183   184   185   186   187   188