mirror of
https://github.com/olikraus/u8g2.git
synced 2026-09-12 01:32:33 +00:00
issue #769
This commit is contained in:
+8
-4
@@ -713,7 +713,8 @@ extern "C" uint8_t u8x8_byte_arduino_hw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t a
|
||||
|
||||
break;
|
||||
case U8X8_MSG_BYTE_INIT:
|
||||
u8x8->bus_clock = u8x8->display_info->sck_clock_hz;
|
||||
if ( u8x8->bus_clock == 0 ) /* issue 769 */
|
||||
u8x8->bus_clock = u8x8->display_info->sck_clock_hz;
|
||||
/* disable chipselect */
|
||||
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
|
||||
|
||||
@@ -832,7 +833,8 @@ extern "C" uint8_t u8x8_byte_arduino_2nd_hw_spi(U8X8_UNUSED u8x8_t *u8x8, U8X8_U
|
||||
|
||||
break;
|
||||
case U8X8_MSG_BYTE_INIT:
|
||||
u8x8->bus_clock = u8x8->display_info->sck_clock_hz;
|
||||
if ( u8x8->bus_clock == 0 ) /* issue 769 */
|
||||
u8x8->bus_clock = u8x8->display_info->sck_clock_hz;
|
||||
/* disable chipselect */
|
||||
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
|
||||
/* no wait required here */
|
||||
@@ -1135,7 +1137,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:
|
||||
u8x8->bus_clock = u8x8->display_info->i2c_bus_clock_100kHz * 100000UL;
|
||||
if ( u8x8->bus_clock == 0 ) /* issue 769 */
|
||||
u8x8->bus_clock = u8x8->display_info->i2c_bus_clock_100kHz * 100000UL;
|
||||
#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 )
|
||||
@@ -1180,7 +1183,8 @@ extern "C" uint8_t u8x8_byte_arduino_2nd_hw_i2c(U8X8_UNUSED u8x8_t *u8x8, U8X8_U
|
||||
Wire1.write((uint8_t *)arg_ptr, (int)arg_int);
|
||||
break;
|
||||
case U8X8_MSG_BYTE_INIT:
|
||||
u8x8->bus_clock = u8x8->display_info->i2c_bus_clock_100kHz * 100000UL;
|
||||
if ( u8x8->bus_clock == 0 ) /* issue 769 */
|
||||
u8x8->bus_clock = u8x8->display_info->i2c_bus_clock_100kHz * 100000UL;
|
||||
Wire1.begin();
|
||||
break;
|
||||
case U8X8_MSG_BYTE_SET_DC:
|
||||
|
||||
Reference in New Issue
Block a user