This module defines the interface for the SSD1351 display library. It was tested with the Adafruit 1.5" OLED Display, but should work with any SSD1351 display running in SPI mode.
On the Intel Edison don't forget to disable SPI Power Management (PM) for this driver to work, you can find more details on this topic here: http://iotdk.intel.com/docs/master/mraa/edison.html
for (int i = 0; i < SSD1351HEIGHT; i++) {
for (int j = 0; j < SSD1351WIDTH; j++) {
display.drawPixel(i, j, colors[i / 8]);
}
}
display.refresh();
upm_delay(5);
for (int i = 0; i < SSD1351HEIGHT / 32; i++) {
for (int j = 0; j < SSD1351WIDTH / 32; j++) {
display.fillRect(i * 32, j * 32, 32, 32, colors[i * 4 + j]);
}
}
display.refresh();
upm_delay(5);
display.fillScreen(0x2104);
for (int i = 0; i < SSD1351HEIGHT / 32; i++) {
for (int j = 0; j < SSD1351WIDTH / 32; j++) {
display.drawCircle(i * 32 + 15, j * 32 + 15, 15, colors[i * 4 + j]);
}
}
display.refresh();
upm_delay(5);
display.fillScreen(INTEL_BLUE);
display.setTextColor(WHITE, INTEL_BLUE);
display.setTextSize(4);
display.setCursor(7, 30);
display.print("Intel");
display.setCursor(5, 70);
display.print("IoTDK");
display.refresh();
|
| SSD1351 (int oc, int dc, int rst) |
|
| ~SSD1351 () |
|
std::string | name () |
|
void | writeCommand (uint8_t value) |
|
void | writeData (uint8_t value) |
|
void | drawPixel (int16_t x, int16_t y, uint16_t color) |
|
void | refresh () |
|
void | ocLow () |
|
void | ocHigh () |
|
void | dcLow () |
|
void | dcHigh () |
|
void | useMemoryMap (bool var) |
|
| GFX (int16_t w, int16_t h) |
|
virtual | ~GFX () |
|
virtual void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
|
virtual void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) |
|
virtual void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) |
|
virtual void | drawRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
|
virtual void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
|
virtual void | fillScreen (uint16_t color) |
|
virtual void | invertDisplay (bool i) |
|
void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
|
void | drawCircleHelper (int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color) |
|
void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
|
void | fillCircleHelper (int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color) |
|
void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
|
void | fillTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
|
void | drawRoundRect (int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color) |
|
void | fillRoundRect (int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color) |
|
void | drawChar (int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size) |
|
int16_t | getCursorX (void) const |
|
int16_t | getCursorY (void) const |
|
void | setCursor (int16_t x, int16_t y) |
|
void | setTextColor (uint16_t c) |
|
void | setTextColor (uint16_t c, uint16_t bg) |
|
void | setTextSize (uint8_t s) |
|
void | setTextWrap (bool w) |
|
uint8_t | getRotation (void) const |
|
void | setRotation (uint8_t r) |
|
void | cp437 (bool x) |
|
virtual void | write (uint8_t c) |
|
void | print (std::string msg) |
|
int16_t | width (void) const |
|
int16_t | height (void) const |
|
| GFX (int width, int height) |
|
virtual | ~GFX () |
|
void | drawChar (int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size) |
|
void | print (std::string msg) |
|
void | fillScreen (uint16_t color) |
|
void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
|
void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) |
|
void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
|
void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
|
void | drawCircle (int16_t x, int16_t y, int16_t r, uint16_t color) |
|
void | setCursor (int16_t x, int16_t y) |
|
void | setTextColor (uint16_t textColor, uint16_t textBGColor) |
|
void | setTextSize (uint8_t size) |
|
void | setTextWrap (uint8_t wrap) |
|
| GFX (int width, int height, uint8_t *screenBuffer, const unsigned char *font) |
|
virtual | ~GFX () |
|
virtual void | setAddrWindow (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1)=0 |
|
void | drawChar (int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size) |
|
void | print (std::string msg) |
|
mraa::Result | setPixel (int x, int y, uint16_t color) |
|
void | fillScreen (uint16_t color) |
|
void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
|
void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) |
|
void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
|
void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
|
void | drawCircle (int16_t x, int16_t y, int16_t r, uint16_t color) |
|
void | setCursor (int16_t x, int16_t y) |
|
void | setTextColor (uint16_t textColor, uint16_t textBGColor) |
|
void | setTextSize (uint8_t size) |
|
void | setTextWrap (uint8_t wrap) |
|