Skip to content

Commit

Permalink
i2cdev: Fix #139 (clock stertching on esp32s)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleRus committed Dec 13, 2020
1 parent b6166f3 commit 3162016
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/i2cdev/i2cdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@
extern "C" {
#endif

#if HELPER_TARGET_IS_ESP32
#define I2CDEV_MAX_STRETCH_TIME 0x00ffffff
#elif HELPER_TARGET_IS_ESP8266
#if HELPER_TARGET_IS_ESP8266
#define I2CDEV_MAX_STRETCH_TIME 0xffffffff
#else
#include <soc/i2c_reg.h>
#ifdef I2C_TIME_OUT_REG_V
#define I2CDEV_MAX_STRETCH_TIME I2C_TIME_OUT_REG_V
#else
#define I2CDEV_MAX_STRETCH_TIME 0x00ffffff
#endif
#endif

/**
Expand Down

0 comments on commit 3162016

Please sign in to comment.