Class to manage hardware interface with SSD1331 chipset.
More...
#include <Adafruit_SSD1331.h>
|
| | Adafruit_SSD1331 (int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, int8_t rst) |
| | Instantiate Adafruit SSD1331 driver with software SPI. More...
|
| |
| | Adafruit_SSD1331 (int8_t cs, int8_t dc, int8_t rst) |
| | Instantiate Adafruit SSD1331 driver with hardware SPI. More...
|
| |
| | Adafruit_SSD1331 (SPIClass *spi, int8_t cs, int8_t dc, int8_t rst=-1) |
| | Instantiate Adafruit SSD1331 driver with hardware SPI. More...
|
| |
| void | begin (uint32_t begin=8000000) |
| | Initialize SSD1331 chip Connects to the SSD1331 over SPI and sends initialization procedure commands. More...
|
| |
| void | setRotation (uint8_t r) |
| | Set origin of (0,0) and orientation of OLED display. More...
|
| |
| void | setAddrWindow (uint16_t x, uint16_t y, uint16_t w, uint16_t h) |
| | SPI displays set an address window rectangle for blitting pixels. More...
|
| |
| void | enableDisplay (boolean enable) |
| | Change whether display is on or off. More...
|
| |
|
|
static const int16_t | TFTWIDTH = 96 |
| | The width of the display.
|
| |
|
static const int16_t | TFTHEIGHT = 64 |
| | The height of the display.
|
| |
Class to manage hardware interface with SSD1331 chipset.
◆ Adafruit_SSD1331() [1/3]
| Adafruit_SSD1331::Adafruit_SSD1331 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
mosi, |
|
|
int8_t |
sclk, |
|
|
int8_t |
rst |
|
) |
| |
Instantiate Adafruit SSD1331 driver with software SPI.
- Parameters
-
| cs | Chip select pin # |
| dc | Data/Command pin # |
| mosi | SPI MOSI pin # |
| sclk | SPI Clock pin # |
| rst | Reset pin # (optional, pass -1 if unused) |
◆ Adafruit_SSD1331() [2/3]
| Adafruit_SSD1331::Adafruit_SSD1331 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst |
|
) |
| |
Instantiate Adafruit SSD1331 driver with hardware SPI.
- Parameters
-
| cs | Chip select pin # |
| dc | Data/Command pin # |
| rst | Reset pin # (optional, pass -1 if unused) |
◆ Adafruit_SSD1331() [3/3]
| Adafruit_SSD1331::Adafruit_SSD1331 |
( |
SPIClass * |
spi, |
|
|
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1 |
|
) |
| |
Instantiate Adafruit SSD1331 driver with hardware SPI.
- Parameters
-
| spi | Pointer to an existing SPIClass instance (e.g. &SPI, the microcontroller's primary SPI bus). |
| cs | Chip select pin # |
| dc | Data/Command pin # |
| rst | Reset pin # (optional, pass -1 if unused) |
◆ begin()
| void Adafruit_SSD1331::begin |
( |
uint32_t |
freq = 8000000 | ) |
|
Initialize SSD1331 chip Connects to the SSD1331 over SPI and sends initialization procedure commands.
- Parameters
-
| freq | Desired SPI clock frequency |
◆ setRotation()
| void Adafruit_SSD1331::setRotation |
( |
uint8_t |
r | ) |
|
Set origin of (0,0) and orientation of OLED display.
- Parameters
-
| r | The index for rotation, from 0-3 inclusive |
- Returns
- None (void).
- Note
- SSD1331 works differently than most (all?) other SPITFT displays. With certain rotation changes the screen contents may change immediately into a peculiar format (mirrored, not necessarily rotated) (other displays, this only affects new drawing – rotation combinations can apply to different areas). Therefore, it's recommend to clear the screen (fillScreen(0)) before changing rotation.
◆ setAddrWindow()
| void Adafruit_SSD1331::setAddrWindow |
( |
uint16_t |
x, |
|
|
uint16_t |
y, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
SPI displays set an address window rectangle for blitting pixels.
- Parameters
-
| x | Top left corner x coordinate |
| y | Top left corner x coordinate |
| w | Width of window |
| h | Height of window |
◆ enableDisplay()
| void Adafruit_SSD1331::enableDisplay |
( |
boolean |
enable | ) |
|
Change whether display is on or off.
- Parameters
-
| enable | True if you want the display ON, false OFF |
The documentation for this class was generated from the following files: