diff --git a/src/SH1106Brzo.h b/src/SH1106Brzo.h index 6f8c723..0ecc22d 100644 --- a/src/SH1106Brzo.h +++ b/src/SH1106Brzo.h @@ -47,12 +47,12 @@ class SH1106Brzo : public OLEDDisplay { uint8_t _scl; public: - SH1106Brzo(uint8_t _address, uint8_t _sda, uint8_t _scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { + SH1106Brzo(uint8_t address, uint8_t sda, uint8_t scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g); - this->_address = _address; - this->_sda = _sda; - this->_scl = _scl; + this->_address = address; + this->_sda = sda; + this->_scl = scl; } bool connect(){ diff --git a/src/SH1106Spi.h b/src/SH1106Spi.h index 2862e9f..fd1a42c 100644 --- a/src/SH1106Spi.h +++ b/src/SH1106Spi.h @@ -42,12 +42,12 @@ class SH1106Spi : public OLEDDisplay { public: /* pass _cs as -1 to indicate "do not use CS pin", for cases where it is hard wired low */ - SH1106Spi(uint8_t _rst, uint8_t _dc, uint8_t _cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { + SH1106Spi(uint8_t rst, uint8_t dc, uint8_t cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g); - this->_rst = _rst; - this->_dc = _dc; - this->_cs = _cs; + this->_rst = rst; + this->_dc = dc; + this->_cs = cs; } bool connect(){ diff --git a/src/SH1106Wire.h b/src/SH1106Wire.h index a15bfc7..a6e122a 100644 --- a/src/SH1106Wire.h +++ b/src/SH1106Wire.h @@ -53,7 +53,7 @@ class SH1106Wire : public OLEDDisplay { int _scl; bool _doI2cAutoInit = false; TwoWire* _wire = NULL; - int _frequency; + long _frequency; public: /** @@ -71,18 +71,18 @@ class SH1106Wire : public OLEDDisplay { * @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, int _frequency = 700000) { + 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); - 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; + this->_wire = (i2cBus==I2C_ONE) ? &Wire : &Wire1; #endif - this->_frequency = _frequency; + this->_frequency = frequency; } bool connect() { diff --git a/src/SSD1306Brzo.h b/src/SSD1306Brzo.h index dc323e2..a960d1e 100644 --- a/src/SSD1306Brzo.h +++ b/src/SSD1306Brzo.h @@ -47,12 +47,12 @@ class SSD1306Brzo : public OLEDDisplay { uint8_t _scl; public: - SSD1306Brzo(uint8_t _address, uint8_t _sda, uint8_t _scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { + SSD1306Brzo(uint8_t address, uint8_t sda, uint8_t scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g); - this->_address = _address; - this->_sda = _sda; - this->_scl = _scl; + this->_address = address; + this->_sda = sda; + this->_scl = scl; } bool connect(){ diff --git a/src/SSD1306I2C.h b/src/SSD1306I2C.h index ab94840..35691b7 100644 --- a/src/SSD1306I2C.h +++ b/src/SSD1306I2C.h @@ -42,13 +42,13 @@ class SSD1306I2C : public OLEDDisplay { public: - SSD1306I2C(uint8_t _address, PinName _sda, PinName _scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { + SSD1306I2C(uint8_t address, PinName sda, PinName scl, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g); - this->_address = _address << 1; // convert from 7 to 8 bit for mbed. - this->_sda = _sda; - this->_scl = _scl; - _i2c = new I2C(_sda, _scl); + this->_address = address << 1; // convert from 7 to 8 bit for mbed. + this->_sda = sda; + this->_scl = scl; + _i2c = new I2C(sda, scl); } bool connect() { diff --git a/src/SSD1306Spi.h b/src/SSD1306Spi.h index b8d7b78..6985eab 100644 --- a/src/SSD1306Spi.h +++ b/src/SSD1306Spi.h @@ -48,12 +48,12 @@ class SSD1306Spi : public OLEDDisplay { public: /* pass _cs as -1 to indicate "do not use CS pin", for cases where it is hard wired low */ - SSD1306Spi(uint8_t _rst, uint8_t _dc, uint8_t _cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { + SSD1306Spi(uint8_t rst, uint8_t dc, uint8_t cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g); - this->_rst = _rst; - this->_dc = _dc; - this->_cs = _cs; + this->_rst = rst; + this->_dc = dc; + this->_cs = cs; } bool connect(){ diff --git a/src/SSD1306Wire.h b/src/SSD1306Wire.h index bb6c978..51fe1cc 100644 --- a/src/SSD1306Wire.h +++ b/src/SSD1306Wire.h @@ -53,7 +53,7 @@ class SSD1306Wire : public OLEDDisplay { int _scl; bool _doI2cAutoInit = false; TwoWire* _wire = NULL; - int _frequency; + long _frequency; public: @@ -72,7 +72,7 @@ class SSD1306Wire : public OLEDDisplay { * @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, int _frequency = 700000) { + 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; @@ -81,7 +81,7 @@ class SSD1306Wire : public OLEDDisplay { #if !defined(ARDUINO_ARCH_ESP32) this->_wire = &Wire; #else - this->_wire = (_i2cBus==I2C_ONE) ? &Wire : &Wire1; + this->_wire = (i2cBus == I2C_ONE) ? &Wire : &Wire1; #endif this->_frequency = _frequency; }