Skip to content

Commit

Permalink
Fix PR #404
Browse files Browse the repository at this point in the history
Fixes #410, #411
  • Loading branch information
marcelstoer committed May 25, 2024
1 parent 0fd872e commit ed1feac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
sentence=I2C display driver for SSD1306 OLED displays connected to ESP8266, ESP32, Mbed-OS
Expand Down
10 changes: 5 additions & 5 deletions src/SH1106Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 9 additions & 9 deletions src/SSD1306Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ed1feac

Please sign in to comment.