Page 177 - MDP2022-2
P. 177

*/
            int  main(void)
            {
                /*  USER  CODE  BEGIN  1  */


                /*  USER  CODE  END  1  */


                /*  MCU  Configuration--------------------------------------------------------*/


                /*  Reset  of  all  peripherals,  Initializes  the  Flash  interface  and  the  Systick.  */
                HAL_Init();


                /*  USER  CODE  BEGIN  Init  */


                /*  USER  CODE  END  Init  */


                /*  Configure  the  system  clock  */
                SystemClock_Config();


                /*  USER  CODE  BEGIN  SysInit  */


                /*  USER  CODE  END  SysInit  */


                /*  Initialize  all  configured  peripherals  */
                MX_GPIO_Init();
                MX_DMA_Init();
                MX_USART1_UART_Init();
                MX_TIM1_Init();
                MX_I2C2_Init();
                MX_TIM3_Init();
                /*  USER  CODE  BEGIN  2  */
                  DWT_Delay_Init();
            //    Wifi_Enable();
            //    Wifi_Init();
            //    Wifi_Init();
            //    Wifi_Restart();
            //    Wifi_GetMode();
                  HAL_GPIO_WritePin(LIGHT_2_GPIO_Port,  LIGHT_2_Pin,  GPIO_PIN_RESET);
                  HAL_GPIO_WritePin(LIGHT_2_GPIO_Port,  LIGHT_2_Pin,  GPIO_PIN_RESET);


                  //_ham();
                  WS2812_Send2();
                  WS2812_Send();
                  res  =  HAL_I2C_IsDeviceReady(&hi2c2,  QWIIC_KEYPAD_ADDR,  2,  200);
                  set_led_pattern2();
   172   173   174   175   176   177   178   179   180   181   182