[mw_shl_code=c,true] #include "hdc1000.h"
#include "delay.h"
void HDC1000_Init(void)
{
IIC_Init();/
}
void ConfigureRegister(void)
{
IIC_Start();
IIC_Send_Byte(0XA2);
IIC_Wait_Ack();
IIC_Send_Byte(0X00);
IIC_Wait_Ack();
IIC_Send_Byte(0X00);
IIC_Wait_Ack();
IIC_Stop();
}
u8 ReadOutput(void)
{
u8 time_s;
IIC_Start();
IIC_Send_Byte(0XA2);
IIC_Wait_Ack();
IIC_Send_Byte(0X02);
IIC_Wait_Ack();
IIC_Send_Byte(0XA3);
IIC_Wait_Ack();
time_s = IIC_Read_Byte(0);
IIC_Stop();
return time_s;
}[/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>