Page 890 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 890

GPIO_InitStructure.GPIO_Pin    =  GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10;       //  GPIOD

            8,9,10번  사용
                 GPIO_InitStructure.GPIO_Mode   = GPIO_Mode_IN_FLOATING;
                 GPIO_Init(GPIOD,  &GPIO_InitStructure);


                 /*  USART1 Tx  (PA.09)  as  alternate function  push-pull  */
                 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
                    GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_AF_PP;
                 GPIO_InitStructure.GPIO_Speed  =  GPIO_Speed_50MHz;

                    GPIO_Init(GPIOA,  &GPIO_InitStructure);

                 /*  USART1 Rx  (PA.10) as  input  floating */

                 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
                 GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_IN_FLOATING;
                    GPIO_Init(GPIOA,  &GPIO_InitStructure);



                    /*  TIM4  사용  설정  */
                 GPIO_InitStructure.GPIO_Pin
                    =  GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9;

                    //  GPIOB  6,7,8,9번  사용
                    GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_AF_PP;
                 GPIO_InitStructure.GPIO_Speed  =  GPIO_Speed_50MHz;
                 GPIO_Init(GPIOB,  &GPIO_InitStructure);

            }


            static  void  Delay_ms  (int  cnt)  {
                 cnt <<=  18;

                 while (cnt--);
            }


            /*  인터럽트  설정  */

            void  NVIC_Configuration(void)
            {
                NVIC_InitTypeDef NVIC_InitStructure;

            #ifdef      VECT_TAB_RAM
                 /*    Set   the  Vector    Table  base    location    at   0x20000000   */




                                                         -  883  -
   885   886   887   888   889   890   891   892   893   894   895