add ability to create object without RST pin (default -1)

This commit is contained in:
ladyada
2015-10-15 20:54:58 -04:00
parent 5674153e88
commit a69564befe
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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);