47 bool begin(TwoWire &wire, uint8_t addr,
int sda = -1,
int scl = -1)
50 return beginCommon<SensorCommI2C, HalArduino>(
comm,
hal, wire, addr, sda, scl);
63 bool begin(SPIClass &spi, uint8_t csPin,
int mosi = -1,
int miso = -1,
int sck = -1)
66 return beginCommon<SensorCommSPI, HalArduino>(
comm,
hal, spi, csPin, mosi, miso, sck);
70#elif defined(ESP_PLATFORM)
71#if defined(SENSORLIB_USE_I2C_LEGACY)
80 bool begin(i2c_port_t port_num, uint8_t addr,
int sda = -1,
int scl = -1)
83 return beginCommon<SensorCommI2C, HalEspIDF>(
comm,
hal, port_num, addr, sda, scl);
93 bool begin(i2c_master_bus_handle_t handle, uint8_t addr)
96 return beginCommon<SensorCommI2C, HalEspIDF>(
comm,
hal, handle, addr);
110 bool begin(spi_host_device_t host, spi_device_handle_t handle,
111 uint8_t csPin,
int mosi = -1,
int miso = -1,
int sck = -1)
114 return beginCommon<SensorCommSPI, HalEspIDF>(
comm,
hal, host, handle, csPin, mosi, miso, sck);
133 return beginCommCustomCallback<SensorCommCustom, SensorCommCustomHal>(
144 if (!
comm || !
hal)
return false;
bool begin(CommInterface interface, SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback, uint8_t addr=0)
Initialize the sensor using custom callback interface.