feat: onewire and ds18b20 driver
This commit is contained in:
30
lib/onewire/onewire.h
Normal file
30
lib/onewire/onewire.h
Normal file
@ -0,0 +1,30 @@
|
||||
//
|
||||
// Created by 5ANK41 on 2024/11/28.
|
||||
//
|
||||
|
||||
#ifndef ONEWIRE_H
|
||||
#define ONEWIRE_H
|
||||
|
||||
#include <8052.h>
|
||||
|
||||
#ifndef uchar
|
||||
#define uchar unsigned char
|
||||
#endif
|
||||
|
||||
#ifndef uint
|
||||
#define uint unsigned int
|
||||
#endif
|
||||
|
||||
#define ONE_WIRE_P P3_7
|
||||
|
||||
uchar OneWire_init(void);
|
||||
|
||||
void OneWire_writeBit(uchar _bit);
|
||||
|
||||
void OneWire_writeByte(uchar _byte);
|
||||
|
||||
uchar OneWire_readBit(void);
|
||||
|
||||
uchar OneWire_readByte(void);
|
||||
|
||||
#endif //ONEWIRE_H
|
Reference in New Issue
Block a user