Page 470 - MDP2020-1
P. 470

|    인천전자마이스터고등학교  ·············································································································
            464

                *  @retval  None
                */
            static  void  MX_GPIO_Init(void)
            {

                GPIO_InitTypeDef  GPIO_InitStruct  =  {0};


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

                __HAL_RCC_GPIOA_CLK_ENABLE();


                /*Configure  GPIO  pin  Output  Level  */
                HAL_GPIO_WritePin(GPIOA,  GPIO_PIN_0|GPIO_PIN_1,  GPIO_PIN_RESET);
                                                //  GPIO  PORT  A  (0,1)  사용



                /*Configure  GPIO  pins  :  PC0  PC1  */
                GPIO_InitStruct.Pin  =  GPIO_PIN_0|GPIO_PIN_1;
                                                              //  GPIO  PORT  C  (0,1)  사용
                GPIO_InitStruct.Mode  =  GPIO_MODE_INPUT;

                                                                //  입력  모드
                GPIO_InitStruct.Pull  =  GPIO_NOPULL;
                HAL_GPIO_Init(GPIOC,  &GPIO_InitStruct);


                /*Configure  GPIO  pins  :  PA0  PA1  */
                GPIO_InitStruct.Pin  =  GPIO_PIN_0|GPIO_PIN_1;

                                                            //  GPIO  PORT  A  (0,1)  사용
                GPIO_InitStruct.Mode  =  GPIO_MODE_OUTPUT_PP;
                                                              //  푸시풀  모드
                GPIO_InitStruct.Pull  =  GPIO_NOPULL;
                GPIO_InitStruct.Speed  =  GPIO_SPEED_FREQ_LOW;

                HAL_GPIO_Init(GPIOA,  &GPIO_InitStruct);
            }
   465   466   467   468   469   470   471   472   473   474   475