第二次优化代码,增加闹钟、蜂鸣器功能。

This commit is contained in:
Andy0613
2026-07-07 09:12:08 +08:00
parent 971abf1cd8
commit 6c23af74d4
13 changed files with 4896 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#ifndef __DS18B20_H_
#define __DS18B20_H_
#include<reg51.h>
#include<intrins.h>
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef uint
#define uint unsigned int
#endif
sbit DS18B20_DQ = P3^7;
void DS18B20_Reset(void);
void DS18B20_WriteByte(uchar dat);
uchar DS18B20_ReadByte(void);
void DS18B20_StartConvert(void);
bit DS18B20_GetTemp(int *temp);
void DS18B20_SetResolution(uchar res);
#endif