#include <Adafruit_SSD1327.h>
|
| Adafruit_SSD1327 (uint16_t w, uint16_t h, TwoWire *twi=&Wire, int8_t rst_pin=-1, uint32_t preclk=400000, uint32_t postclk=100000) |
| Constructor for I2C-interfaced SSD1327 displays. More...
|
|
| Adafruit_SSD1327 (uint16_t w, uint16_t h, int8_t mosi_pin, int8_t sclk_pin, int8_t dc_pin, int8_t rst_pin, int8_t cs_pin) |
| Constructor for SPI SSD1327 displays, using software (bitbang) SPI. More...
|
|
| Adafruit_SSD1327 (uint16_t w, uint16_t h, SPIClass *spi, int8_t dc_pin, int8_t rst_pin, int8_t cs_pin, uint32_t bitrate=8000000UL) |
| Constructor for SPI SSD1327 displays, using native hardware SPI. More...
|
|
| ~Adafruit_SSD1327 (void) |
| Destructor for Adafruit_SSD1327 object.
|
|
bool | begin (uint8_t i2caddr=SSD1327_I2C_ADDRESS, bool reset=true) |
| Allocate RAM for image buffer, initialize peripherals and pins. More...
|
|
void | display () |
| Do the actual writing of the internal frame buffer to display RAM.
|
|
void | invertDisplay (bool i) |
| Enable or disable display invert mode (white-on-black vs black-on-white). Handy for testing! More...
|
|
The controller object for SSD1327 OLED displays
◆ Adafruit_SSD1327() [1/3]
Adafruit_SSD1327::Adafruit_SSD1327 |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
TwoWire * |
twi = &Wire , |
|
|
int8_t |
rst_pin = -1 , |
|
|
uint32_t |
clkDuring = 400000 , |
|
|
uint32_t |
clkAfter = 100000 |
|
) |
| |
Constructor for I2C-interfaced SSD1327 displays.
- Parameters
-
w | Display width in pixels |
h | Display height in pixels |
twi | Pointer to an existing TwoWire instance (e.g. &Wire, the microcontroller's primary I2C bus). |
rst_pin | Reset pin (using Arduino pin numbering), or -1 if not used (some displays might be wired to share the microcontroller's reset pin). |
clkDuring | Speed (in Hz) for Wire transmissions in SSD1327 library calls. Defaults to 400000 (400 KHz), a known 'safe' value for most microcontrollers, and meets the SSD1327 datasheet spec. Some systems can operate I2C faster (800 KHz for ESP32, 1 MHz for many other 32-bit MCUs), and some (perhaps not all) SSD1327's can work with this – so it's optionally be specified here and is not a default behavior. (Ignored if using pre-1.5.7 Arduino software, which operates I2C at a fixed 100 KHz.) |
clkAfter | Speed (in Hz) for Wire transmissions following SSD1327 library calls. Defaults to 100000 (100 KHz), the default Arduino Wire speed. This is done rather than leaving it at the 'during' speed because other devices on the I2C bus might not be compatible with the faster rate. (Ignored if using pre-1.5.7 Arduino software, which operates I2C at a fixed 100 KHz.) |
- Note
- Call the object's begin() function before use – buffer allocation is performed there!
◆ Adafruit_SSD1327() [2/3]
Adafruit_SSD1327::Adafruit_SSD1327 |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
int8_t |
mosi_pin, |
|
|
int8_t |
sclk_pin, |
|
|
int8_t |
dc_pin, |
|
|
int8_t |
rst_pin, |
|
|
int8_t |
cs_pin |
|
) |
| |
Constructor for SPI SSD1327 displays, using software (bitbang) SPI.
- Parameters
-
w | Display width in pixels |
h | Display height in pixels |
mosi_pin | MOSI (master out, slave in) pin (using Arduino pin numbering). This transfers serial data from microcontroller to display. |
sclk_pin | SCLK (serial clock) pin (using Arduino pin numbering). This clocks each bit from MOSI. |
dc_pin | Data/command pin (using Arduino pin numbering), selects whether display is receiving commands (low) or data (high). |
rst_pin | Reset pin (using Arduino pin numbering), or -1 if not used (some displays might be wired to share the microcontroller's reset pin). |
cs_pin | Chip-select pin (using Arduino pin numbering) for sharing the bus with other devices. Active low. |
- Note
- Call the object's begin() function before use – buffer allocation is performed there!
◆ Adafruit_SSD1327() [3/3]
Adafruit_SSD1327::Adafruit_SSD1327 |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
SPIClass * |
spi, |
|
|
int8_t |
dc_pin, |
|
|
int8_t |
rst_pin, |
|
|
int8_t |
cs_pin, |
|
|
uint32_t |
bitrate = 8000000UL |
|
) |
| |
Constructor for SPI SSD1327 displays, using native hardware SPI.
- Parameters
-
w | Display width in pixels |
h | Display height in pixels |
spi | Pointer to an existing SPIClass instance (e.g. &SPI, the microcontroller's primary SPI bus). |
dc_pin | Data/command pin (using Arduino pin numbering), selects whether display is receiving commands (low) or data (high). |
rst_pin | Reset pin (using Arduino pin numbering), or -1 if not used (some displays might be wired to share the microcontroller's reset pin). |
cs_pin | Chip-select pin (using Arduino pin numbering) for sharing the bus with other devices. Active low. |
bitrate | SPI clock rate for transfers to this display. Default if unspecified is 8000000UL (8 MHz). |
- Note
- Call the object's begin() function before use – buffer allocation is performed there!
◆ begin()
bool Adafruit_SSD1327::begin |
( |
uint8_t |
addr = SSD1327_I2C_ADDRESS , |
|
|
bool |
reset = true |
|
) |
| |
Allocate RAM for image buffer, initialize peripherals and pins.
- Parameters
-
addr | I2C address of corresponding SSD1327 display. SPI displays (hardware or software) do not use addresses, but this argument is still required (pass 0 or any value really, it will simply be ignored). Default if unspecified is 0. |
reset | If true, and if the reset pin passed to the constructor is valid, a hard reset will be performed before initializing the display. If using multiple SSD1327 displays on the same bus, and if they all share the same reset pin, you should only pass true on the first display being initialized, false on all others, else the already-initialized displays would be reset. Default if unspecified is true. |
- Returns
- true on successful allocation/init, false otherwise. Well-behaved code should check the return value before proceeding.
- Note
- MUST call this function before any drawing or updates!
◆ invertDisplay()
void Adafruit_SSD1327::invertDisplay |
( |
bool |
i | ) |
|
Enable or disable display invert mode (white-on-black vs black-on-white). Handy for testing!
- Parameters
-
i | If true, switch to invert mode (black-on-white), else normal mode (white-on-black). |
The documentation for this class was generated from the following files: