From ed1feac82e5af62cf3a9c130c5e0b148f2436d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Sat, 25 May 2024 11:08:57 +0200 Subject: [PATCH] Fix PR #404 Fixes #410, #411 --- library.json | 2 +- library.properties | 2 +- src/SH1106Wire.h | 10 +++++----- src/SSD1306Wire.h | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/library.json b/library.json index 59a36b3..9daec27 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ESP8266 and ESP32 OLED driver for SSD1306 displays", - "version": "4.6.0", + "version": "4.6.1", "keywords": "ssd1306, oled, display, i2c", "description": "I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS", "license": "MIT", diff --git a/library.properties b/library.properties index d6acb76..e880b32 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP8266 and ESP32 OLED driver for SSD1306 displays -version=4.6.0 +version=4.6.1 author=ThingPulse, Fabrice Weinberg maintainer=ThingPulse sentence=I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS diff --git a/src/SH1106Wire.h b/src/SH1106Wire.h index a6e122a..3127dbe 100644 --- a/src/SH1106Wire.h +++ b/src/SH1106Wire.h @@ -64,12 +64,12 @@ class SH1106Wire : public OLEDDisplay { * ensure -1 value are specified for all 3 parameters. This can be usefull to control TwoWire with multiple * device on the same bus. * - * @param _address I2C Display address - * @param _sda I2C SDA pin number, default to -1 to skip Wire begin call - * @param _scl I2C SCL pin number, default to -1 (only SDA = -1 is considered to skip Wire begin call) + * @param address I2C Display address + * @param sda I2C SDA pin number, default to -1 to skip Wire begin call + * @param scl I2C SCL pin number, default to -1 (only SDA = -1 is considered to skip Wire begin call) * @param g display geometry dafault to generic GEOMETRY_128_64, see OLEDDISPLAY_GEOMETRY definition for other options - * @param _i2cBus on ESP32 with 2 I2C HW buses, I2C_ONE for 1st Bus, I2C_TWO fot 2nd bus, default I2C_ONE - * @param _frequency for Frequency by default Let's use ~700khz if ESP8266 is in 160Mhz mode, this will be limited to ~400khz if the ESP8266 in 80Mhz mode + * @param i2cBus on ESP32 with 2 I2C HW buses, I2C_ONE for 1st Bus, I2C_TWO fot 2nd bus, default I2C_ONE + * @param frequency for Frequency by default Let's use ~700khz if ESP8266 is in 160Mhz mode, this will be limited to ~400khz if the ESP8266 in 80Mhz mode */ SH1106Wire(uint8_t address, int sda = -1, int scl = -1, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64, HW_I2C i2cBus = I2C_ONE, long frequency = 700000) { setGeometry(g); diff --git a/src/SSD1306Wire.h b/src/SSD1306Wire.h index 51fe1cc..8abd4cb 100644 --- a/src/SSD1306Wire.h +++ b/src/SSD1306Wire.h @@ -65,25 +65,25 @@ class SSD1306Wire : public OLEDDisplay { * ensure -1 value are specified for all 3 parameters. This can be usefull to control TwoWire with multiple * device on the same bus. * - * @param _address I2C Display address - * @param _sda I2C SDA pin number, default to -1 to skip Wire begin call - * @param _scl I2C SCL pin number, default to -1 (only SDA = -1 is considered to skip Wire begin call) + * @param address I2C Display address + * @param sda I2C SDA pin number, default to -1 to skip Wire begin call + * @param scl I2C SCL pin number, default to -1 (only SDA = -1 is considered to skip Wire begin call) * @param g display geometry dafault to generic GEOMETRY_128_64, see OLEDDISPLAY_GEOMETRY definition for other options - * @param _i2cBus on ESP32 with 2 I2C HW buses, I2C_ONE for 1st Bus, I2C_TWO fot 2nd bus, default I2C_ONE - * @param _frequency for Frequency by default Let's use ~700khz if ESP8266 is in 160Mhz mode, this will be limited to ~400khz if the ESP8266 in 80Mhz mode + * @param i2cBus on ESP32 with 2 I2C HW buses, I2C_ONE for 1st Bus, I2C_TWO fot 2nd bus, default I2C_ONE + * @param frequency for Frequency by default Let's use ~700khz if ESP8266 is in 160Mhz mode, this will be limited to ~400khz if the ESP8266 in 80Mhz mode */ SSD1306Wire(uint8_t address, int sda = -1, int scl = -1, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64, HW_I2C i2cBus = I2C_ONE, long frequency = 700000) { setGeometry(g); - this->_address = _address; - this->_sda = _sda; - this->_scl = _scl; + this->_address = address; + this->_sda = sda; + this->_scl = scl; #if !defined(ARDUINO_ARCH_ESP32) this->_wire = &Wire; #else this->_wire = (i2cBus == I2C_ONE) ? &Wire : &Wire1; #endif - this->_frequency = _frequency; + this->_frequency = frequency; } bool connect() {