TR-mbed 1.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Adafruit_SSD1306_Spi Class Reference

#include <Adafruit_SSD1306.h>

Inheritance diagram for Adafruit_SSD1306_Spi:
Adafruit_SSD1306 Adafruit_GFX

Public Member Functions

 Adafruit_SSD1306_Spi (SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght=32, uint8_t rawWidth=128)
 
virtual void command (uint8_t c)
 
virtual void data (uint8_t c)
 
- Public Member Functions inherited from Adafruit_SSD1306
 Adafruit_SSD1306 (PinName RST, uint8_t rawHeight=32, uint8_t rawWidth=128)
 
void begin (uint8_t switchvcc=SSD1306_SWITCHCAPVCC)
 
virtual void drawPixel (int16_t x, int16_t y, uint16_t color)
 Paint one BLACK or WHITE pixel in the display buffer.
 
void clearDisplay (void)
 Clear the display buffer.
 
virtual void invertDisplay (bool i)
 
void display ()
 Cause the display to be updated with the buffer content.
 
virtual void splash ()
 Fill the buffer with the AdaFruit splash screen.
 
- Public Member Functions inherited from Adafruit_GFX
 Adafruit_GFX (int16_t w, int16_t h)
 
virtual int _putc (int value)
 
virtual int _getc ()
 
void drawChar (int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
 Draw a text character at a specified pixel location.
 
size_t writeChar (uint8_t)
 Draw a text character at the text cursor location.
 
int16_t width (void)
 Get the width of the display in pixels.
 
int16_t height (void)
 Get the height of the display in pixels.
 
void setTextCursor (int16_t x, int16_t y)
 Set the text cursor location, based on the size of the text.
 
void setTextColor (uint16_t c)
 Set the text foreground and background colors to be the same.
 
void setTextColor (uint16_t c, uint16_t b)
 Set the text foreground and background colors independantly.
 
void setTextWrap (bool w)
 Set text wraping mode true or false.
 
void setRotation (uint8_t r)
 Set the display rotation, 1, 2, 3, or 4.
 
uint8_t getRotation (void)
 Get the current rotation.
 

Protected Member Functions

virtual void sendDisplayBuffer ()
 

Protected Attributes

DigitalOut2 cs
 
DigitalOut2 dc
 
SPI & mspi
 
- Protected Attributes inherited from Adafruit_SSD1306
DigitalOut2 rst
 
std::vector< uint8_t > buffer
 
- Protected Attributes inherited from Adafruit_GFX
int16_t _rawWidth
 
int16_t _rawHeight
 
int16_t _width
 
int16_t _height
 
int16_t cursor_x
 
int16_t cursor_y
 
uint16_t textcolor
 
uint16_t textbgcolor
 
uint8_t textsize
 
uint8_t rotation
 
bool wrap
 

Detailed Description

This is the SPI SSD1306 display driver transport class

Constructor & Destructor Documentation

◆ Adafruit_SSD1306_Spi()

Adafruit_SSD1306_Spi::Adafruit_SSD1306_Spi ( SPI &  spi,
PinName  DC,
PinName  RST,
PinName  CS,
uint8_t  rawHieght = 32,
uint8_t  rawWidth = 128 
)
inline

Create a SSD1306 SPI transport display driver instance with the specified DC, RST, and CS pins, as well as the display dimentions

Required parameters

Parameters
spi- a reference to an initialized SPI object
DC(Data/Command) pin name
RST(Reset) pin name
CS(Chip Select) pin name

Optional parameters

Parameters
rawHeight- the vertical number of pixels for the display, defaults to 32
rawWidth- the horizonal number of pixels for the display, defaults to 128

Member Function Documentation

◆ command()

virtual void Adafruit_SSD1306_Spi::command ( uint8_t  c)
inlinevirtual

Implements Adafruit_SSD1306.

◆ data()

virtual void Adafruit_SSD1306_Spi::data ( uint8_t  c)
inlinevirtual

Implements Adafruit_SSD1306.

◆ sendDisplayBuffer()

virtual void Adafruit_SSD1306_Spi::sendDisplayBuffer ( )
inlineprotectedvirtual

Implements Adafruit_SSD1306.

Member Data Documentation

◆ cs

DigitalOut2 Adafruit_SSD1306_Spi::cs
protected

◆ dc

DigitalOut2 Adafruit_SSD1306_Spi::dc
protected

◆ mspi

SPI& Adafruit_SSD1306_Spi::mspi
protected

The documentation for this class was generated from the following file: