mirror of
https://github.com/adafruit/Adafruit_SSD1306.git
synced 2026-07-27 20:05:50 +00:00
add ability to create object without RST pin (default -1)
This commit is contained in:
@@ -203,7 +203,7 @@ void Adafruit_SSD1306::begin(uint8_t vccstate, uint8_t i2caddr, bool reset) {
|
||||
#endif
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
if (reset >= 0) {
|
||||
// Setup reset pin direction (used by both SPI and I2C)
|
||||
pinMode(rst, OUTPUT);
|
||||
digitalWrite(rst, HIGH);
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ class Adafruit_SSD1306 : public Adafruit_GFX {
|
||||
public:
|
||||
Adafruit_SSD1306(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, int8_t CS);
|
||||
Adafruit_SSD1306(int8_t DC, int8_t RST, int8_t CS);
|
||||
Adafruit_SSD1306(int8_t RST);
|
||||
Adafruit_SSD1306(int8_t RST = -1);
|
||||
|
||||
void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC, uint8_t i2caddr = SSD1306_I2C_ADDRESS, bool reset=true);
|
||||
void ssd1306_command(uint8_t c);
|
||||
|
||||
Reference in New Issue
Block a user