欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
求大神指導,stm32控制sr505,一直沒有實現功能
[打印本頁]
作者:
陽新墨
時間:
2018-6-29 23:35
標題:
求大神指導,stm32控制sr505,一直沒有實現功能
include "bodyinduction.h"
#include "led.h"
int BodyInduction;
/*******************************************************************************
* Function Name :
* Description : èËìåoìía¸Dó| òy½ÅμÄÅäÖÃ
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void Body_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOG,ENABLE);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;//¸Dó|¸ßμçÆ½£¬êÇêäèëÏÂà-°é
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Pin = BODY_GPIO_Pin;
GPIO_Init(BODY_GPIO_PORT,&GPIO_InitStructure);
}
/*******************************************************************************
* Function Name :
* Description : èËìåoìía¸Dó|oˉêy£¬μ±¸Dó|μ½èË£¬êä3ö¸ßμçÆ½£¬2¢½«è«¾Ö±äá¿BodyInductionÖÃ1
·ñÔòÖÃ0;
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void Run_Induction(void)
{
if(1 == GPIO_ReadInputDataBit(BODY_GPIO_PORT,BODY_GPIO_Pin) ) BodyInduction=1;
else BodyInduction=0;
}
/*******************************************************************************
* Function Name :
* Description : ÅD¶Ï£¬è«¾Ö±äá¿BodyInduction Îa1 ê±£¬ÔËDD3ìDò
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void Run_BodyInduction_Action(void)
{
if(1==BodyInduction)
{
led1=!led1;
}
}
歡迎光臨 (http://m.raoushi.com/bbs/)
Powered by Discuz! X3.1