新手上路
- 积分
- 39
- 金钱
- 39
- 注册时间
- 2019-4-11
- 在线时间
- 7 小时
|

楼主 |
发表于 2019-4-11 11:36:50
|
显示全部楼层
//3õê¼»ˉDHT11μÄIO¿ú DQ í¬ê±¼ì2aDHT11μÄ′æÔú
//·μ»Ø1:2»′æÔú
//·μ»Ø0:′æÔú
u8 DHT11_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); //ê1ÄüPG¶Ë¿úê±Öó
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11; //PG11¶Ë¿úÅäÖÃ
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //íÆíìêä3ö
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure); //3õê¼»ˉIO¿ú
GPIO_SetBits(GPIOA,GPIO_Pin_11); //PG11 êä3ö¸ß
初始化这里也已经改过了,主要是方向那里8<<12是什么意思不是特别理解 |
|