mirror of
https://github.com/olikraus/u8g2.git
synced 2026-07-28 04:16:07 +00:00
add a global define that can displabe Wire.setClock()
This commit is contained in:
+9
-3
@@ -1341,8 +1341,11 @@ extern "C" uint8_t u8x8_byte_arduino_hw_i2c(U8X8_UNUSED u8x8_t *u8x8, U8X8_UNUSE
|
||||
case U8X8_MSG_BYTE_START_TRANSFER:
|
||||
#if ARDUINO >= 10600
|
||||
/* not sure when the setClock function was introduced, but it is there since 1.6.0 */
|
||||
/* if there is any error with Wire.setClock() just remove this function call */
|
||||
Wire.setClock(u8x8->bus_clock);
|
||||
/* if there is any error with Wire.setClock() just remove this function call by */
|
||||
/* defining U8x8_DO_NOT_SET_WIRE_CLOCK */
|
||||
#ifndef U8x8_DO_NOT_SET_WIRE_CLOCK
|
||||
Wire.setClock(u8x8->bus_clock);
|
||||
#endif
|
||||
#endif
|
||||
Wire.beginTransmission(u8x8_GetI2CAddress(u8x8)>>1);
|
||||
break;
|
||||
@@ -1374,8 +1377,11 @@ extern "C" uint8_t u8x8_byte_arduino_2nd_hw_i2c(U8X8_UNUSED u8x8_t *u8x8, U8X8_U
|
||||
case U8X8_MSG_BYTE_START_TRANSFER:
|
||||
#if ARDUINO >= 10600
|
||||
/* not sure when the setClock function was introduced, but it is there since 1.6.0 */
|
||||
/* if there is any error with Wire.setClock() just remove this function call */
|
||||
/* if there is any error with Wire.setClock() just remove this function call by */
|
||||
/* defining U8x8_DO_NOT_SET_WIRE_CLOCK */
|
||||
#ifndef U8x8_DO_NOT_SET_WIRE_CLOCK
|
||||
Wire1.setClock(u8x8->bus_clock);
|
||||
#endif
|
||||
#endif
|
||||
Wire1.beginTransmission(u8x8_GetI2CAddress(u8x8)>>1);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user