did nothing

This commit is contained in:
2024-11-28 01:26:36 +08:00
parent 138867439f
commit 31482c9a70
6 changed files with 11 additions and 249 deletions

View File

@ -11,7 +11,7 @@ uchar Ds18b20Init(void) {
uchar i;
DSPORT = 0; // Pull down bus
i = 70;
while(i--);
while(i--) {}
DSPORT = 1; // Pull up bus
i = 0;
while(DSPORT) {
@ -29,7 +29,7 @@ void Ds18b20WriteByte(uchar payload) {
i++;
DSPORT = payload & 0x01;
i = 6;
while(i--);
while(i--){}
DSPORT = 1;
payload >>= 1;
}

View File

@ -15,7 +15,7 @@
void Delay1ms(uint y);
uchar Ds18b20Init(void);
void Ds18b20WriteByte(uchar com);
void Ds18b20WriteByte(uchar payload);
uchar Ds18b20ReadByte(void);
void Ds18b20ChangTemp(void);
void Ds18b20ReadTempCom(void);