| GPIO_InitTypeDef GPIO_InitStruct; GPIO_StructInit(&GPIO_InitStruct);
 
 SYS_WR_PROTECT = 0x7a83;
 
 SYS_IO_CFG |= BIT5;//bit5置1     RST功能:SYS_IO_CFG.bit5 = 0   GPIO功能:SYS_IO_CFG.bit5 = 1
 
 SYS_WR_PROTECT = 0;
 #if 0
 //IN
 GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN; /*GPIO输入模式*/
 GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;     /*Pin2*/
 GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;  /*上拉功能*/  //上拉100kΩ
 GPIO_Init(GPIO0, &GPIO_InitStruct);
 //如果要使用外部中断 可加入 EXTI_Trigger_Config()
 #else
 //OUT
 GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT; /*GPIO输出模式*/
 GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;     /*Pin2*/
 GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;  /*上拉功能*/   //上拉100kΩ
 GPIO_Init(GPIO0, &GPIO_InitStruct);
 
 #endif
 |