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

#include <Adafruit_SSD1306.h>

Inheritance diagram for Adafruit_SSD1306:
Adafruit_GFX Adafruit_SSD1306_I2c Adafruit_SSD1306_Spi

Public Member Functions

 Adafruit_SSD1306 (PinName RST, uint8_t rawHeight=32, uint8_t rawWidth=128)
 
void begin (uint8_t switchvcc=SSD1306_SWITCHCAPVCC)
 
virtual void command (uint8_t c)=0
 
virtual void data (uint8_t c)=0
 
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 ()=0
 

Protected Attributes

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

The pure base class for the SSD1306 display driver.

You should derive from this for a new transport interface type, such as the SPI and I2C drivers.

Constructor & Destructor Documentation

◆ Adafruit_SSD1306()

Adafruit_SSD1306::Adafruit_SSD1306 ( PinName  RST,
uint8_t  rawHeight = 32,
uint8_t  rawWidth = 128 
)
inline

Member Function Documentation

◆ begin()

void Adafruit_SSD1306::begin ( uint8_t  switchvcc = SSD1306_SWITCHCAPVCC)

◆ clearDisplay()

void Adafruit_SSD1306::clearDisplay ( void  )

Clear the display buffer.

◆ command()

virtual void Adafruit_SSD1306::command ( uint8_t  c)
pure virtual

◆ data()

virtual void Adafruit_SSD1306::data ( uint8_t  c)
pure virtual

◆ display()

void Adafruit_SSD1306::display ( void  )

Cause the display to be updated with the buffer content.

◆ drawPixel()

void Adafruit_SSD1306::drawPixel ( int16_t  x,
int16_t  y,
uint16_t  color 
)
virtual

Paint one BLACK or WHITE pixel in the display buffer.

Implements Adafruit_GFX.

◆ invertDisplay()

void Adafruit_SSD1306::invertDisplay ( bool  i)
virtual

Reimplemented from Adafruit_GFX.

◆ sendDisplayBuffer()

virtual void Adafruit_SSD1306::sendDisplayBuffer ( )
protectedpure virtual

◆ splash()

void Adafruit_SSD1306::splash ( void  )
virtual

Fill the buffer with the AdaFruit splash screen.

Member Data Documentation

◆ buffer

std::vector<uint8_t> Adafruit_SSD1306::buffer
protected

◆ rst

DigitalOut2 Adafruit_SSD1306::rst
protected

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