程序如下
RCC_AHB1PeriphClockCmd(0x1FF, ENABLE); //IO port I-A clock enabled
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; //OutPut DEGI
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD; //设置为开漏输出(PS:推挽输出只是输出不能)
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; //PullUP
GPIO_InitStructure.GPIO_Pin = 0x0010; GPIO_Init(GPIOE, &GPIO_InitStructure); //pin13,15
main_DS28E10();
|