mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 00:11:59 +01:00
[dalas_temp] add strong pullup functionality
This commit is contained in:
parent
65d86e2928
commit
299bcb3e74
@ -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_()) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user