12namespace bme68x_bsec2_i2c {
14static const char *
const TAG =
"bme68x_bsec2_i2c.sensor";
16void BME68xBSEC2I2CComponent::setup() {
18 this->
bme68x_.intf_ptr = (
void *)
this;
19 this->
bme68x_.intf = BME68X_I2C_INTF;
20 this->
bme68x_.read = BME68xBSEC2I2CComponent::read_bytes_wrapper;
21 this->
bme68x_.write = BME68xBSEC2I2CComponent::write_bytes_wrapper;
22 this->
bme68x_.delay_us = BME68xBSEC2I2CComponent::delay_us;
25 BME68xBSEC2Component::setup();
28void BME68xBSEC2I2CComponent::dump_config() {
30 BME68xBSEC2Component::dump_config();
35int8_t BME68xBSEC2I2CComponent::read_bytes_wrapper(uint8_t a_register, uint8_t *data, uint32_t
len,
void *intfPtr) {
36 ESP_LOGVV(TAG,
"read_bytes_wrapper: reg = %u", a_register);
40int8_t BME68xBSEC2I2CComponent::write_bytes_wrapper(uint8_t a_register,
const uint8_t *data, uint32_t
len,
42 ESP_LOGVV(TAG,
"write_bytes_wrapper: reg = %u", a_register);
46void BME68xBSEC2I2CComponent::delay_us(uint32_t period,
void *intfPtr) {
47 ESP_LOGVV(TAG,
"Delaying for %" PRIu32
"us", period);