|
| ST7789_TFT () |
| Constructor for class ST7789_TFT.
|
|
virtual void | setAddrWindow (uint16_t, uint16_t, uint16_t, uint16_t) override |
| SPI displays set an address window rectangle for blitting pixels.
|
|
void | TFTSetupGPIO (int8_t, int8_t, int8_t, int8_t, int8_t) |
| sets up TFT GPIO for software SPI
|
|
void | TFTSetupGPIO (int8_t, int8_t) |
| sets up TFT GPIO for Hardware SPi
|
|
void | TFTInitScreenSize (uint8_t xOffset, uint8_t yOffset, uint16_t w, uint16_t h) |
| initialise the variables that define the size of the screen
|
|
rdlib::Return_Codes_e | TFTInitSPI (uint16_t CommDelay, int gpioDev) |
| intialise PCBtype and SPI, Software SPI
|
|
rdlib::Return_Codes_e | TFTInitSPI (int device, int channel, int speed, int flags, int gpioDev) |
| intialise SPI, Hardware SPI
|
|
uint16_t | HighFreqDelayGet (void) |
| Freq delay used in SW SPI getter, uS delay used in SW SPI method.
|
|
void | HighFreqDelaySet (uint16_t) |
| Freq delay used in SW SPI setter, uS delay used in SW SPI method.
|
|
rdlib::Return_Codes_e | TFTPowerDown (void) |
| Call when powering down TFT.
|
|
void | TFTsetRotation (display_rotate_e r) |
| : change rotation of display.
|
|
void | TFTchangeInvertMode (bool m) |
| Toggle the invert mode.
|
|
void | TFTpartialDisplay (bool m) |
| Toggle the partial display mode.
|
|
void | TFTenableDisplay (bool m) |
| enable /disable display mode
|
|
void | TFTidleDisplay (bool m) |
| Toggle the idle display mode.
|
|
void | TFTsleepDisplay (bool m) |
| Toggle the sleep mode.
|
|
void | TFTNormalMode (void) |
| return Display to normal mode
|
|
void | TFTsetScrollDefinition (uint16_t th, uint16_t tb, bool sd) |
| This method defines the Vertical Scrolling Area of the display where:
|
|
void | TFTVerticalScroll (uint16_t vsp) |
| : This method is used together with the TFTsetScrollDefinition.
|
|
rdlib::Return_Codes_e | TFTResetPin (void) |
| Method for Hardware Reset pin control.
|
|
| color16_graphics () |
| Construct a new graphics class object.
|
|
void | fillScreen (uint16_t color) |
| Fills the whole screen with a given color.
|
|
void | setCursor (int16_t x, int16_t y) |
| Set the Cursor Position on screen.
|
|
void | drawPixel (uint16_t, uint16_t, uint16_t) |
| Draw a pixel to screen.
|
|
rdlib::Return_Codes_e | drawDotGrid (int16_t x, int16_t y, int16_t w, int16_t h, uint8_t DotGridGap, uint16_t color) |
| Draws a grid of dots on the screen starting from the given coordinates. This function draws a grid of pixels with a specified gap between them. It checks that the provided coordinates and dimensions are within the screen bounds and adjusts them if necessary. It also validates The grid of dots gap value and defaults it to 2 if invalid.
|
|
void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
| draws a line from (x0,y0) to (x1,y1).
|
|
rdlib::Return_Codes_e | drawFastVLine (uint16_t x, uint16_t y, uint16_t h, uint16_t color) |
| Draws a vertical line starting at (x,y) with height h.
|
|
rdlib::Return_Codes_e | drawFastHLine (uint16_t x, uint16_t y, uint16_t w, uint16_t color) |
| Draws a horizontal line starting at (x,y) with width w.
|
|
void | drawLineAngle (int16_t x, int16_t y, int angle, uint8_t start, uint8_t length, int offset, uint16_t color) |
| Draws a line using an angle and length as parameters. This function draws a line starting from (x, y) , extending in the direction specified by angle , with a given length . The function also allows applying an offset to the angle before computing the line’s end coordinates.
|
|
void | drawRectWH (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) |
| draws rectangle at (x,y) where h is height and w is width of the rectangle.
|
|
rdlib::Return_Codes_e | fillRectangle (uint16_t, uint16_t, uint16_t, uint16_t, uint16_t) |
| fills a rectangle starting from coordinates (x,y) with width of w and height of h.
|
|
void | fillRect (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) |
| fills a rectangle at (x,y) where h is height and w is width of the rectangle.
|
|
void | drawRoundRect (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t r, uint16_t color) |
| draws a rectangle with rounded edges
|
|
void | fillRoundRect (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t r, uint16_t color) |
| Fills a rectangle with rounded edges.
|
|
void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| draws a circle where (x0,y0) are center coordinates an r is circle radius.
|
|
void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| fills a circle where (x0,y0) are center coordinates an r is circle radius.
|
|
void | drawEllipse (int16_t cx, int16_t cy, int16_t semiMajorAxis, int16_t semiMinorAxis, bool fill, uint16_t color) |
| Draw an ellipse on the display. This function uses the midpoint ellipse algorithm to efficiently draw an ellipse centered at (cx, cy) with the given semi-major (horizontal) and semi-minor (vertical) axes.
|
|
void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
| draws a triangle of coordinates (x0,y0), (x1,y1) and (x2,y2).
|
|
void | fillTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
| Fills a triangle of coordinates (x0,y0), (x1,y1) and (x2,y2).
|
|
void | drawQuadrilateral (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, uint16_t color) |
| Draws a quadrilateral (four-sided polygon) by connecting four points with lines. This function draws a quadrilateral by drawing four lines between the given vertices. The lines are drawn in the order: (x0, y0) to (x1, y1), (x1, y1) to (x2, y2), (x2, y2) to (x3, y3), and finally (x3, y3) back to (x0, y0).
|
|
void | fillQuadrilateral (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, uint16_t color, bool useTriangleSplit=true) |
| Fills a quadrilateral with the specified color using triangles. This function fills a quadrilateral by dividing it into triangles and filling them individually. The quadrilateral is filled by calling the fillTriangle function three times with appropriate vertex coordinates. The useTriangleSplit parameter determines whether the quadrilateral is divided into two triangles or if only one triangle is used.
|
|
rdlib::Return_Codes_e | drawPolygon (int16_t x, int16_t y, uint8_t sides, int16_t diameter, float rotation, bool fill, uint16_t color) |
| Draws a polygon with a specified number of sides, diameter, rotation, and color. This function draws a regular polygon by connecting points equally spaced around a circle, with each point having a distance defined by the diameter. The polygon is rotated by the given angle (in degrees) before being drawn. The number of sides is enforced to be at least 3.
|
|
void | drawSimpleArc (int16_t cx, int16_t cy, int16_t radius, float startAngle, float endAngle, uint16_t color) |
| Draw a simple arc of one pixel on the display( no offsets , thickness or maximum arc calculations) This function draws an arc between two angles (start and end) on a circle with a given radius.
|
|
void | drawArc (uint16_t cx, uint16_t cy, uint16_t radius, uint16_t thickness, float startAngle, float endAngle, uint16_t color) |
| Draw an arc on the TFT display. This function draws an arc between two angles (start and end) on a circle with a given radius.
|
|
float | getArcAngleMax () const |
| Get the current maximum angle of the arc.
|
|
void | setArcAngleMax (float arcAngleMax) |
| Set a new maximum angle for the arc.
|
|
int | getArcAngleOffset () const |
| Get the current angle offset.
|
|
void | setArcAngleOffset (int arcAngleOffset) |
| Set a new angle offset.
|
|
virtual size_t | write (uint8_t) override |
| write method used in the print class when user calls print
|
|
rdlib::Return_Codes_e | writeChar (int16_t x, int16_t y, char value) |
| Write 1 character on Display.
|
|
rdlib::Return_Codes_e | writeCharString (int16_t x, int16_t y, char *text) |
| Write Text character array on display.
|
|
void | setTextWrap (bool w) |
| turn on or off screen wrap of the text (fonts 1-6)
|
|
void | setTextColor (uint16_t c, uint16_t bg) |
| Set text color foreground and background.
|
|
void | setTextColor (uint16_t c) |
| Set text color foreground.
|
|
rdlib::Return_Codes_e | drawIcon (uint16_t x, uint16_t y, uint16_t w, uint16_t color, uint16_t bgcolor, const std::span< const uint8_t > data) |
| Draws an custom Icon of X by 8 size to screen , where X = 0 to 127.
|
|
rdlib::Return_Codes_e | drawBitmap (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color, uint16_t bgcolor, const std::span< const uint8_t > data) |
| : Draws an bi-color bitmap to screen
|
|
rdlib::Return_Codes_e | drawBitmap24 (uint16_t x, uint16_t y, const std::span< const uint8_t > data, uint16_t w, uint16_t h) |
| Draws an 24 bit color bitmap to screen from a data array.
|
|
rdlib::Return_Codes_e | drawBitmap16 (uint16_t x, uint16_t y, const std::span< const uint8_t > data, uint16_t w, uint16_t h) |
| : Draws an 16 bit color bitmap to screen from a data array
|
|
rdlib::Return_Codes_e | drawSprite (uint16_t x, uint16_t y, const std::span< const uint8_t > data, uint16_t w, uint16_t h, uint16_t backgroundColor) |
| : Draws an 16 bit color sprite bitmap to screen with transparent background
|
|
int16_t | Color565 (int16_t, int16_t, int16_t) |
| : Convert: 24-bit color to 565 16-bit color
|
|
int | getDisplaySPIBlockSize () const |
| Gets the maximum SPI transaction block size.
|
|
void | setDisplaySPIBlockSize (int size) |
| Sets the maximum SPI transaction block size.
|
|
| display_Fonts () |
| init the OLED font class object constructor
|
|
rdlib::Return_Codes_e | setFont (display_Font_name_e) |
| SetFont.
|
|
void | setInvertFont (bool invertStatus) |
| setInvertFont
|
|
bool | getInvertFont (void) |
| getInvertFont
|
|
int | getWriteError () |
| gets the error flag status, zero no error
|
|
void | clearWriteError () |
| clears the error flag by setting it to zero
|
|
virtual size_t | write (const uint8_t *buffer, size_t size) |
| define in the sub class
|
|
size_t | write (const char *str) |
| Writes a string to the output.
|
|
size_t | write (const char *buffer, size_t size) |
| Writes a buffer of a specified size to the output.
|
|
virtual int | availableForWrite () |
| define in the sub class
|
|
size_t | print (const char[]) |
| print an array
|
|
size_t | print (char) |
| print an character
|
|
size_t | print (int, int=RDL_DEC) |
| print an integer of base number system
|
|
size_t | print (unsigned int, int=RDL_DEC) |
| print an unsigned integer of base number system
|
|
size_t | print (long, int=RDL_DEC) |
| print an long integer of base number system
|
|
size_t | print (unsigned long, int=RDL_DEC) |
| print an unsigned long integer of base number system
|
|
size_t | print (double, int=2) |
| print an double
|
|
size_t | print (const std::string &) |
| print an C++ string object
|
|
size_t | println (const char[]) |
| Prints a character array followed by a newline.
|
|
size_t | println (char) |
| print an character followed by new line
|
|
size_t | println (int, int=RDL_DEC) |
| print an integer of base number system followed by new line
|
|
size_t | println (unsigned int, int=RDL_DEC) |
| print an unsigned integer of base number system followed by new line
|
|
size_t | println (long, int=RDL_DEC) |
| print an long integer of base number system followed by new line
|
|
size_t | println (unsigned long, int=RDL_DEC) |
| print an unsigned long integer of base number system followed by new line
|
|
size_t | println (double, int=2) |
| print an double
|
|
size_t | println (void) |
| Goto to new line.
|
|
size_t | println (const std::string &s) |
| print an C++ string object followed by new line
|
|
template<typename T > |
size_t | print (const std::vector< T > &v, int format=defaultFormat< T >()) |
| Print a vector of any type.
|
|
template<typename T > |
size_t | println (const std::vector< T > &vec, int format=defaultFormat< T >()) |
| Print a vector of elements followed by a newline.
|
|
template<typename T , size_t N> |
size_t | print (const std::array< T, N > &arr, int format=defaultFormat< T >()) |
| Print a std::array of any type.
|
|
template<typename T , size_t N> |
size_t | println (const std::array< T, N > &arr, int format=defaultFormat< T >()) |
| Print a std::array of elements followed by a newline.
|
|