6 static const char *
const TAG =
"one_wire";
27 if (devices.empty()) {
28 ESP_LOGE(TAG,
"No devices, can't auto-select address");
31 if (devices.size() > 1) {
32 ESP_LOGE(TAG,
"More than one device, can't auto-select address");
std::string format_hex(const uint8_t *data, size_t length)
Format the byte array data of length len in lowercased hex.
bool select(uint64_t address)
Select a specific address on the bus for the following command.
const std::vector< uint64_t > & get_devices()
Return the list of found devices.
std::string str_lower_case(const std::string &str)
Convert the string to lower case.
virtual void write8(uint8_t val)=0
Write a word to the bus. LSB first.
std::string address_name_
bool check_address_()
find an address if necessary should be called from setup
const std::string & get_address_name()
Helper to create (and cache) the name for this sensor. For example "0xfe0000031f1eaf29".
Implementation of SPI Controller mode.
OneWireBus * bus_
pointer to OneWireBus instance
bool send_command_(uint8_t cmd)
send command on the bus