mirror of
https://github.com/olikraus/u8g2.git
synced 2026-09-12 01:32:33 +00:00
issue #377, added HW I2C pin remapping for ESP32
This commit is contained in:
+2
-2
@@ -541,8 +541,8 @@ extern "C" uint8_t u8x8_byte_arduino_hw_i2c(U8X8_UNUSED u8x8_t *u8x8, U8X8_UNUSE
|
||||
Wire.write((uint8_t *)arg_ptr, (int)arg_int);
|
||||
break;
|
||||
case U8X8_MSG_BYTE_INIT:
|
||||
#ifdef ESP8266
|
||||
/* for ESP8266, Wire.begin has two more arguments: clock and data */
|
||||
#if defined(ESP8266) || defined(ARDUINO_ARCH_ESP8266) || defined(ESP_PLATFORM) || defined(ARDUINO_ARCH_ESP32)
|
||||
/* for ESP8266/ESP32, Wire.begin has two more arguments: clock and data */
|
||||
if ( u8x8->pins[U8X8_PIN_I2C_CLOCK] != U8X8_PIN_NONE && u8x8->pins[U8X8_PIN_I2C_DATA] != U8X8_PIN_NONE )
|
||||
{
|
||||
// second argument for the wire lib is the clock pin. In u8g2, the first argument of the clock pin in the clock/data pair
|
||||
|
||||
Reference in New Issue
Block a user