DIYmall 0.96" Inch I2c IIC Serial 128x64 Oled LCD LED White Display Module
Fork of Adafruit_GFX by
Revision 17:5ae7e46da43f, committed 2018-10-09
- Comitter:
- afmiee
- Date:
- Tue Oct 09 20:56:41 2018 +0000
- Parent:
- 16:7fb1d4d3525d
- Commit message:
- Changes done to be used with DIYmall 0.96" Inch I2c IIC Serial 128x64 Oled LCD LED White Display Module available on Amazon
Changed in this revision
diff -r 7fb1d4d3525d -r 5ae7e46da43f Adafruit_GFX_Config.h --- a/Adafruit_GFX_Config.h Tue Nov 11 22:08:20 2014 +0000 +++ b/Adafruit_GFX_Config.h Tue Oct 09 20:56:41 2018 +0000 @@ -5,10 +5,10 @@ //#define NO_SPLASH_ADAFRUIT // Uncomment this to enable all functionality -//#define GFX_WANT_ABSTRACTS +#define GFX_WANT_ABSTRACTS // Uncomment this to enable only runtime font scaling, without all the rest of the Abstracts -//#define GFX_SIZEABLE_TEXT +#define GFX_SIZEABLE_TEXT #endif \ No newline at end of file
diff -r 7fb1d4d3525d -r 5ae7e46da43f Adafruit_SSD1306.cpp --- a/Adafruit_SSD1306.cpp Tue Nov 11 22:08:20 2014 +0000 +++ b/Adafruit_SSD1306.cpp Tue Oct 09 20:56:41 2018 +0000 @@ -84,7 +84,7 @@ command(_rawHeight == 32 ? 0x02 : 0x12); // TODO - calculate based on _rawHieght ? command(SSD1306_SETCONTRAST); - command(_rawHeight == 32 ? 0x8F : ((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF) ); + command(_rawHeight == 64 ? 0x8F : ((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF) ); command(SSD1306_SETPRECHARGE); command((vccstate == SSD1306_EXTERNALVCC) ? 0x22 : 0xF1); @@ -185,7 +185,7 @@ 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x002, 0x00, // 128x32^^^ 128x64vvv 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x0F, 0x87, 0xC7, 0xF7, 0xFF, 0xFF, 0x1F, 0x1F, 0x3D, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0x7C, 0x7D, 0xFF,
diff -r 7fb1d4d3525d -r 5ae7e46da43f Adafruit_SSD1306.h --- a/Adafruit_SSD1306.h Tue Nov 11 22:08:20 2014 +0000 +++ b/Adafruit_SSD1306.h Tue Oct 09 20:56:41 2018 +0000 @@ -50,7 +50,7 @@ class Adafruit_SSD1306 : public Adafruit_GFX { public: - Adafruit_SSD1306(PinName RST, uint8_t rawHeight = 32, uint8_t rawWidth = 128) + Adafruit_SSD1306(PinName RST, uint8_t rawHeight = 64, uint8_t rawWidth = 128) : Adafruit_GFX(rawWidth,rawHeight) , rst(RST,false) { @@ -100,8 +100,8 @@ * @param rawHeight - the vertical number of pixels for the display, defaults to 32 * @param rawWidth - the horizonal number of pixels for the display, defaults to 128 */ - Adafruit_SSD1306_Spi(SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128) - : Adafruit_SSD1306(RST, rawHieght, rawWidth) + Adafruit_SSD1306_Spi(SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHeight = 64, uint8_t rawWidth = 128) + : Adafruit_SSD1306(RST, rawHeight, rawWidth) , cs(CS,true) , dc(DC,false) , mspi(spi) @@ -139,7 +139,7 @@ for(uint16_t i=0, q=buffer.size(); i<q; i++) mspi.write(buffer[i]); - if(height() == 32) + if(height() == 64) { for(uint16_t i=0, q=buffer.size(); i<q; i++) mspi.write(0); @@ -170,7 +170,7 @@ * @param rawHeight - The vertical number of pixels for the display, defaults to 32 * @param rawWidth - The horizonal number of pixels for the display, defaults to 128 */ - Adafruit_SSD1306_I2c(I2C &i2c, PinName RST, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 32, uint8_t rawWidth = 128) + Adafruit_SSD1306_I2c(I2C &i2c, PinName RST, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 64, uint8_t rawWidth = 128) : Adafruit_SSD1306(RST, rawHeight, rawWidth) , mi2c(i2c) , mi2cAddress(i2cAddress)