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

#include <Adafruit_SSD1306.h>

Inheritance diagram for Adafruit_SSD1306_I2c:
Adafruit_SSD1306 Adafruit_GFX

Public Member Functions

 Adafruit_SSD1306_I2c (I2C &i2c, PinName RST, uint8_t i2cAddress=SSD_I2C_ADDRESS, uint8_t rawHeight=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

I2C & mi2c
 
uint8_t mi2cAddress
 
- 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 I2C SSD1306 display driver transport class

Constructor & Destructor Documentation

◆ Adafruit_SSD1306_I2c()

Adafruit_SSD1306_I2c::Adafruit_SSD1306_I2c ( I2C &  i2c,
PinName  RST,
uint8_t  i2cAddress = SSD_I2C_ADDRESS,
uint8_t  rawHeight = 32,
uint8_t  rawWidth = 128 
)
inline

Create a SSD1306 I2C transport display driver instance with the specified RST pin name, the I2C address, as well as the display dimensions

Required parameters

Parameters
i2c- A reference to an initialized I2C object
RST- The Reset pin name

Optional parameters

Parameters
i2cAddress- The i2c address of the display
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_I2c::command ( uint8_t  c)
inlinevirtual

Implements Adafruit_SSD1306.

◆ data()

virtual void Adafruit_SSD1306_I2c::data ( uint8_t  c)
inlinevirtual

Implements Adafruit_SSD1306.

◆ sendDisplayBuffer()

virtual void Adafruit_SSD1306_I2c::sendDisplayBuffer ( )
inlineprotectedvirtual

Implements Adafruit_SSD1306.

Member Data Documentation

◆ mi2c

I2C& Adafruit_SSD1306_I2c::mi2c
protected

◆ mi2cAddress

uint8_t Adafruit_SSD1306_I2c::mi2cAddress
protected

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