📄 1wire.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -