求教,使用串口2例程发送读取的dht11数据发生错误

[复制链接]
688|0
 楼主| 考哥 发表于 2018-7-3 14:02 | 显示全部楼层 |阅读模式
想用dht11例程改用串口2例程usart2_printf函数使用串口2发送,结果显示错误main.c(51): error:  #167: argument of type "uint8_t" is incompatible with parameter of type "FILE *"和
main.c(51): error:  #140: too many arguments in function call
代码         /*调用Read_DHT11读取温湿度,若成功则输出该信息*/        if( Read_DHT11(&DHT11_Data)==SUCCESS)                                                                                 //“”表示转向一下行
                 printf("
读取DHT11成功!

湿度为%d.%d %RH ,温度为 %d.%d℃
",
                DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci);
USART2_printf( "
读取DHT11成功!

湿度为%d.%d %RH ,温度为 %d.%d℃
",
                DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci
                );
您需要登录后才可以回帖 登录 | 注册

本版积分规则

461

主题

477

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部