Skip to content

Commit

Permalink
add ability to create object without RST pin (default -1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Oct 16, 2015
1 parent 5674153 commit a69564b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Adafruit_SSD1306.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Adafruit_SSD1306.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a69564b

Please sign in to comment.