Merge pull request #168 from KurtE/SPI_SETTINGS_PROTECTED

Allow a sketch to sub-class the SSD1306 object and change SPI settings
This commit is contained in:
Limor "Ladyada" Fried
2020-02-16 18:21:42 -05:00
committed by GitHub
+5 -3
View File
@@ -176,14 +176,16 @@ class Adafruit_SSD1306 : public Adafruit_GFX {
PortReg *mosiPort , *clkPort , *dcPort , *csPort;
PortMask mosiPinMask, clkPinMask, dcPinMask, csPinMask;
#endif
#if defined(SPI_HAS_TRANSACTION)
SPISettings spiSettings;
#endif
#if ARDUINO >= 157
uint32_t wireClk; // Wire speed for SSD1306 transfers
uint32_t restoreClk; // Wire speed following SSD1306 transfers
#endif
uint8_t contrast; // normal contrast setting for this device
#if defined(SPI_HAS_TRANSACTION)
protected:
// Allow sub-class to change
SPISettings spiSettings;
#endif
};
#endif // _Adafruit_SSD1306_H_