Page 267 - MDP2020-1
P. 267

················································································  명장양성프로젝트  【MDP】  과제발표회  자료집  Ⅰ    |  261


                *  @brief  GPIO  Initialization  Function
                *  @param  None
                *  @retval  None
                */
            static  void  MX_GPIO_Init(void)
            {
                GPIO_InitTypeDef  GPIO_InitStruct  =  {0};


                /*  GPIO  Ports  Clock  Enable  */
                __HAL_RCC_GPIOC_CLK_ENABLE();


                /*Configure  GPIO  pin  Output  Level  */
                HAL_GPIO_WritePin(GPIOC,  GPIO_PIN_0|GPIO_PIN_1,  GPIO_PIN_RESET);


                /*Configure  GPIO  pins  :  PC0  PC1  */
                GPIO_InitStruct.Pin  =  GPIO_PIN_0|GPIO_PIN_1;
                GPIO_InitStruct.Mode  =  GPIO_MODE_OUTPUT_PP;
                GPIO_InitStruct.Pull  =  GPIO_NOPULL;
                GPIO_InitStruct.Speed  =  GPIO_SPEED_FREQ_LOW;
                HAL_GPIO_Init(GPIOC,  &GPIO_InitStruct);


                /*Configure  GPIO  pins  :  PC2  PC3  */
                GPIO_InitStruct.Pin  =  GPIO_PIN_2|GPIO_PIN_3;
                GPIO_InitStruct.Mode  =  GPIO_MODE_INPUT;
                GPIO_InitStruct.Pull  =  GPIO_NOPULL;
                HAL_GPIO_Init(GPIOC,  &GPIO_InitStruct);


            }


            /*  USER  CODE  BEGIN  4  */


            /*  USER  CODE  END  4  */


            /**
                *  @brief    This  function  is  executed  in  case  of  error  occurrence.
                *  @retval  None
                */
            void  Error_Handler(void)
            {
                /*  USER  CODE  BEGIN  Error_Handler_Debug  */
                /*  User  can  add  his  own  implementation  to  report  the  HAL  error  return  state  */


                /*  USER  CODE  END  Error_Handler_Debug  */
            }
   262   263   264   265   266   267   268   269   270   271   272