1wire.h

来自「通过车载终端采集GPS数据」· C头文件 代码 · 共 36 行

H
36
字号
#ifndef WIREHEADER
#define WIREHEADER

#define WIRE1_DQ P1_0

/****************************************
*1-wire reset function
*call this function before rom command and function command
*return value:1 :have 1-wire device;0: no 1-wire device
******************************************/
unsigned char wire1_reset();

/******************************************
*read a bit
*return value: the bit readed
*******************************************/
unsigned char wire1_readbit();

/*******************************************
*write a bit
*bitval:write value
*******************************************/
void wire1_writebit(unsigned char bitval);

/********************************************
*
*********************************************/
unsigned char wire1_readbyte();


/*******************************************
*
*******************************************/
void wire1_writebyte(unsigned char value);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?