freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于stm32模擬路燈控制系統(tǒng)(參考版)

2025-06-30 19:17本頁面
  

【正文】 LCD_EN1。則對應(yīng)的I/O端口不變。;而置GPIODBRR低16位的某位為39。則對應(yīng)的I/O端口置39。 //置GPIODBRR低16位的某位為39。 GPIOBBRR = (~a) amp。039。139。139。 0x00ff。 //寫 LCD_EN0。 }void write_data(u8 a) { LCD_RS1。//送入1602delay_ms(5)。 delay_ms(5)。 //將數(shù)據(jù)送到P0口 GPIOBBRR = (~a) amp。 GPIOBBSRR =a amp。 // 寫指令 LCD_RW0。 EXTI_ClearITPendingBit(EXTI_Line9)。} } } // 反向 } EXTI_ClearITPendingBit(EXTI_Line7)。openLED2=0。 if(checkGD3==3) {setflag=0。 setflag=12。openLED2=1。 } // 正向 } if(EXTI_GetITStatus(EXTI_Line9)!=RESET)//檢測指定的EXTI0線路觸發(fā)請求與否 發(fā)生中斷時返回SET 無中斷時返回RESET { if(checkGD1!=2){delay_ms(500)。openLED2=0。LED=0。 setflag=0。openLED2=0。 } TIM_ClearITPendingBit(TIM3, TIM_IT_Update)。 checkGD1=0。openLED2=0。 delay_ms(400)。(checkGD1==2)) { GPIO_ResetBits(GPIOA,GPIO_Pin_15)。 } if((GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_9)==0)amp。openLED2=1。amp。openLED2=0。 checkGD2=1。 LED=0。amp。(checkGD1==0)) { delay_ms(400)。 } if((GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_7)==0)amp。 GPIO_ResetBits(GPIOA,GPIO_Pin_15|GPIO_Pin_14|GPIO_Pin_13)。(setshi4==shi))openLED2=0。 if((setfen4==fen)amp。amp。 } else{openLED2=0。amp。(setshi2==shi))openLED1=0。 if((setfen2==fen)amp。amp。 } else{openLED1=0。amp。 if(LEDGM==0) GPIO_ResetBits(GPIOA,GPIO_Pin_12)。amp。 GPIO_SetBits(GPIOA,GPIO_Pin_5)。}//、提示LED2故障 } else { GPIO_ResetBits(GPIOA,GPIO_Pin_3)。GPIO_SetBits(GPIOA,GPIO_Pin_3)。if(setflag==0)setflag=11。 if((ErrorLED1==1)||(ErrorLED2==1)) { if(ErrorLED1==1){ GPIO_ResetBits(GPIOA,GPIO_Pin_4)。(GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_4)==1)) ErrorLED2=1。(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_11)==1)amp。 //判斷LED2是否出問題 條件是燈且光明被打開 if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_7)==1)amp。(GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_8)==1)) ErrorLED1=1。(GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_5)==1)amp。 } //判斷LED1是否出問題 條件是燈且光明被打開 if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_6)==1)amp。case 0: GPIO_ResetBits(GPIOA,GPIO_Pin_11|GPIO_Pin_7)。 } switch (openLED2)//開啟或關(guān)閉LED2 { case 1: GPIO_SetBits(GPIOA,GPIO_Pin_11|GPIO_Pin_7)。case 0: GPIO_ResetBits(GPIOA,GPIO_Pin_8|GPIO_Pin_6)。 }void TIM3_IRQHandler(void){ switch (openLED1)//開啟或關(guān)閉LED1 1開 { case 1: GPIO_SetBits(GPIOA,GPIO_Pin_8|GPIO_Pin_6)。 } TIM_ClearITPendingBit(TIM2, TIM_IT_Update)。LED=0。 openLED2++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。LED=0。 openLED1++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 }break。if(openLED2=2)openLED2=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。 } if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { delay_ms(5)。if(openLED1=2)openLED1=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 case 10: if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0) { delay_ms(5)。 // setflag=0。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。if(GDflag==2)GDflag=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 case 7: if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0) { delay_ms(5)。if(nian==0)yue=99。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。// } if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { delay_ms(5)。 nian++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。// }break。 yue。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。if(yue==13)yue=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 case 4: if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0) { delay_ms(5)。if(ri==0)ri=31。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。// } if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { delay_ms(5)。 ri++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。// }break。 shi。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。if(shi==24)shi=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 case 2: if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0) { delay_ms(5)。if(fen==0)fen=59。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。// } if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { delay_ms(5)。 fen++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 }// Off }break。//if(LED==6){ LEDGM。//if(LED==5) setshi4++。//if(LED==4) setshi3++。//if(LED==3) setshi2++。if(LED==2) setshi1++。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0)。if(LEDGM=2)LEDGM=0。if(setfen4==60)setfen4=0。if(setfen3==60)setfen3=0。if(setfen2==60)setfen2=0。if(setfen1==60)setfen1=0。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 case 9: if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0) { delay_ms(5)。counter=0。}while(setflag11)。 } if(counter15){do {setflag++。 while(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { counter++。 } } if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)==0) { delay_ms(5)。set++。if(setflag==10)break。 delay_ms(20)。 if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)==0)。 setflag++。//年 Write_Ds1302(0x90,0xa4)。 // 日 Write_Ds1302(0x88,((yue/10)4|(yue%10)))。 // 分 Write_Ds1302(0x84,((shi/10)4|(shi%10)))。}//判斷當(dāng)前按鍵是否被長時間按下兩次
點擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1