-
Notifications
You must be signed in to change notification settings - Fork 24
Drawing
- SSD_COLOR_BLACK: The pixel will be turned off
- SSD_COLOR_WHITE: The pixel will be turned on
- SSD_COLOR_XOR: XOR Will be performed instead of setting a color
Note: These will appear inverted if you set the display to inverted with SSD1306_SetInverted
void IRAM_ATTR SSD1306_DrawPixel( struct SSD1306_Device* DeviceHandle, int x, int y, int Color )
Sets a pixel at (x,y) to (Color)
- Pointer to device handle
- X Coordinate
- Y Coordinate
- Colour to draw with
void IRAM_ATTR SSD1306_DrawHLine( struct SSD1306_Device* DeviceHandle, int x, int y, int Width, int Color )
Draws a horizontal line starting from (x,y) to (x + width,y) using the color (Color)
- Pointer to device handle
- Starting X coordinate
- Starting Y coordinate
- Width of line
- Color of line
void IRAM_ATTR SSD1306_DrawVLine( struct SSD1306_Device* DeviceHandle, int x, int y, int Height, int Color )
Draws a vertical line starting from (x,y) to (x,y + width) with the color (Color)
- Pointer to device handle
- Starting X coordinate
- Starting Y coordinate
- Height of line
- Color of line
void IRAM_ATTR SSD1306_DrawLine( struct SSD1306_Device* DeviceHandle, int x0, int y0, int x1, int y1, int Color )
Draws a line starting from (x0,y0) to (x1,y1) with the color (Color)
- Pointer to device handle
- Starting X coordinate
- Starting Y coordinate
- Ending X coordinate
- Ending Y coordinate
- Color of line
void IRAM_ATTR SSD1306_DrawBox( struct SSD1306_Device* DeviceHandle, int x1, int y1, int x2, int y2, int Color, bool Fill )
Draws a box starting from (x1,y1) to (x2,y2) with color (Color), optionally filling the box instead of just an outline
- Pointer to device handle
- Starting X coordinate
- Starting Y coordinate
- Ending X coordinate
- Ending Y coordinate
- Color of box
- If true the box will be filled with (Color)
void SSD1306_Clear( struct SSD1306_Device* DeviceHandle, int Color )
Fills the local framebuffer with (Color)
Note: This does not send the framebuffer to the screen on it's own
- Pointer to device handle
- Color to fill local framebuffer with