mirror of
https://github.com/esphome/esphome.git
synced 2026-09-03 19:46:02 +00:00
[ds2484] Fix read64() using uint8_t accumulator instead of uint64_t (#14479)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
61ea6c3b2f
commit
55103c0652
@@ -110,9 +110,9 @@ uint8_t DS2484OneWireBus::read8() {
|
||||
}
|
||||
|
||||
uint64_t DS2484OneWireBus::read64() {
|
||||
uint8_t response = 0;
|
||||
uint64_t response = 0;
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
response |= (this->read8() << (i * 8));
|
||||
response |= (static_cast<uint64_t>(this->read8()) << (i * 8));
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user