4 #ifndef _Adafruit_SSD1325_H_ 5 #define _Adafruit_SSD1325_H_ 10 #define _BV(b) (1 << (b)) 13 #include <Adafruit_GFX.h> 33 #define SSD1325_128_64 36 #if defined SSD1325_128_64 && defined SSD1325_128_32 37 #error "Only one SSD1325 display can be specified at once in SSD1325.h" 39 #if !defined SSD1325_128_64 && !defined SSD1325_128_32 40 #error "At least one SSD1325 display must be specified in SSD1325.h" 43 #if defined SSD1325_128_64 44 #define SSD1325_LCDWIDTH 128 45 #define SSD1325_LCDHEIGHT 64 47 #if defined SSD1325_128_32 48 #define SSD1325_LCDWIDTH 128 49 #define SSD1325_LCDHEIGHT 32 52 #define SSD1325_SETCOLADDR 0x15 53 #define SSD1325_SETROWADDR 0x75 54 #define SSD1325_SETCONTRAST 0x81 55 #define SSD1325_SETCURRENT 0x84 57 #define SSD1325_SETREMAP 0xA0 58 #define SSD1325_SETSTARTLINE 0xA1 59 #define SSD1325_SETOFFSET 0xA2 60 #define SSD1325_NORMALDISPLAY 0xA4 61 #define SSD1325_DISPLAYALLON 0xA5 62 #define SSD1325_DISPLAYALLOFF 0xA6 63 #define SSD1325_INVERTDISPLAY 0xA7 64 #define SSD1325_SETMULTIPLEX 0xA8 65 #define SSD1325_MASTERCONFIG 0xAD 66 #define SSD1325_DISPLAYOFF 0xAE 67 #define SSD1325_DISPLAYON 0xAF 69 #define SSD1325_SETPRECHARGECOMPENABLE \ 71 #define SSD1325_SETPHASELEN 0xB1 72 #define SSD1325_SETROWPERIOD 0xB2 73 #define SSD1325_SETCLOCK 0xB3 74 #define SSD1325_SETPRECHARGECOMP 0xB4 75 #define SSD1325_SETGRAYTABLE 0xB8 76 #define SSD1325_SETPRECHARGEVOLTAGE 0xBC 77 #define SSD1325_SETVCOMLEVEL 0xBE 78 #define SSD1325_SETVSL 0xBF 80 #define SSD1325_GFXACCEL 0x23 81 #define SSD1325_DRAWRECT 0x24 82 #define SSD1325_COPY 0x25 99 : Adafruit_GFX(128, 64), sid(SID), sclk(SCLK), dc(DC), rst(RST), cs(CS) {}
109 : Adafruit_GFX(128, 64), sid(SID), sclk(SCLK), dc(DC), rst(RST), cs(-1) {}
117 : Adafruit_GFX(128, 64), sid(-1), sclk(-1), dc(DC), rst(RST), cs(CS) {}
132 void data(uint8_t c);
159 void drawPixel(int16_t x, int16_t y, uint16_t color);
162 int8_t sid, sclk, dc, rst, cs;
163 void spixfer(uint8_t x);
165 volatile uint8_t *mosiport, *clkport;
166 uint8_t mosipinmask, clkpinmask;
void display()
Push data currently in RAM to SSD1325 display.
Definition: Adafruit_SSD1325.cpp:325
void command(uint8_t c)
Issue single command to SSD1325.
Definition: Adafruit_SSD1325.cpp:279
void data(uint8_t c)
Send data to SSD1325.
Definition: Adafruit_SSD1325.cpp:302
void invertDisplay(uint8_t i)
High-level command that enables or disables invert mode (WoB vs BoW)
Definition: Adafruit_SSD1325.cpp:271
Adafruit_SSD1325(int8_t DC, int8_t RST, int8_t CS)
Constructor for SSD1325 display.
Definition: Adafruit_SSD1325.h:116
void setBrightness(uint8_t i)
Sets the display brightness.
Adafruit_SSD1325(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, int8_t CS)
Constructor for SSD1325 display.
Definition: Adafruit_SSD1325.h:98
void clearDisplay(void)
High-level command to clear the display.
Definition: Adafruit_SSD1325.cpp:372
Adafruit_SSD1325(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST)
Constructor for SSD1325 display.
Definition: Adafruit_SSD1325.h:108
void begin(void)
Allocate and initialize display.
Definition: Adafruit_SSD1325.cpp:184
void drawPixel(int16_t x, int16_t y, uint16_t color)
Set/clear/invert a single pixel.
Definition: Adafruit_SSD1325.cpp:148
Class that stores state and functions for interacting with SSD1325 OLED displays. ...
Definition: Adafruit_SSD1325.h:88