Page 181 - MDP2022-2
P. 181

Wifi_SendString("door  OFF\r\n");
                              door_state  =  0;
                              Wifi.usartBuff  =  0;
                              HAL_UART_Receive_IT(&_WIFI_USART,  &Wifi.usartBuff,  1);
                        }  else  if  (Wifi.usartBuff  ==  '\r')  {
                              Wifi.usartBuff  =  0;
                              HAL_UART_Receive_IT(&_WIFI_USART,  &Wifi.usartBuff,  1);
                        }


                  }
                /*  USER  CODE  END  3  */
            }


            /**
                *  @brief  System  Clock  Configuration
                *  @retval  None
                */
            void  SystemClock_Config(void)
            {
                RCC_OscInitTypeDef  RCC_OscInitStruct  =  {0};
                RCC_ClkInitTypeDef  RCC_ClkInitStruct  =  {0};


                /**  Configure  the  main  internal  regulator  output  voltage
                */
                __HAL_RCC_PWR_CLK_ENABLE();
                __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);


                /**  Initializes  the  RCC  Oscillators  according  to  the  specified  parameters
                *  in  the  RCC_OscInitTypeDef  structure.
                */
                RCC_OscInitStruct.OscillatorType  =  RCC_OSCILLATORTYPE_HSI;
                RCC_OscInitStruct.HSIState  =  RCC_HSI_ON;
                RCC_OscInitStruct.HSICalibrationValue  =  RCC_HSICALIBRATION_DEFAULT;
                RCC_OscInitStruct.PLL.PLLState  =  RCC_PLL_ON;
                RCC_OscInitStruct.PLL.PLLSource  =  RCC_PLLSOURCE_HSI;
                RCC_OscInitStruct.PLL.PLLM  =  8;
                RCC_OscInitStruct.PLL.PLLN  =  72;
                RCC_OscInitStruct.PLL.PLLP  =  RCC_PLLP_DIV2;
                RCC_OscInitStruct.PLL.PLLQ  =  4;
                if  (HAL_RCC_OscConfig(&RCC_OscInitStruct)  !=  HAL_OK)
                {
                    Error_Handler();
                }


                /**  Initializes  the  CPU,  AHB  and  APB  buses  clocks
   176   177   178   179   180   181   182   183   184   185   186