[dalas_temp] add strong pullup functionality

This commit is contained in:
Jiri Prchal 2025-01-13 15:07:43 +01:00
parent 65d86e2928
commit 299bcb3e74
2 changed files with 4 additions and 3 deletions

View File

@ -43,6 +43,7 @@ void DallasTemperatureSensor::update() {
this->status_clear_warning();
this->send_command_(DALLAS_COMMAND_START_CONVERSION);
this->bus_->strong_pullup ();
this->set_timeout(this->get_address_name(), this->millis_to_wait_for_conversion_(), [this] {
if (!this->read_scratch_pad_() || !this->check_scratch_pad_()) {

View File

@ -53,9 +53,9 @@ bool HOT IRAM_ATTR GPIOOneWireBus::reset() {
}
void HOT IRAM_ATTR GPIOOneWireBus::strong_pullup() {
// drive bus high during convertion
pin_.pin_mode(gpio::FLAG_OUTPUT);
pin_.digital_write(true);
// drive bus high during convertion
pin_.pin_mode(gpio::FLAG_OUTPUT);
pin_.digital_write(true);
}
void HOT IRAM_ATTR GPIOOneWireBus::write_bit_(bool bit) {