modm API documentation
|
Public Typedefs | |
using | Driver = St7789Driver< Interface, Width, Height > |
Public Member Functions | |
uint16_t | getWidth () const final |
uint16_t | getHeight () const final |
size_t | getBufferWidth () const final |
size_t | getBufferHeight () const final |
void | setPixel (int16_t x, int16_t y) final |
color::Rgb565 | getPixel (int16_t, int16_t) const final |
void | clearPixel (int16_t x, int16_t y) final |
void | clear () final |
void | update () final |
IOStream & | ascii () |
set the output mode to ASCII style for integer types | |
IOStream & | bin () |
set the output mode to binary style for integer types | |
virtual void | clear () = 0 |
virtual void | clearPixel (int16_t x, int16_t y) = 0 |
void | clearPixel (glcd::Point p) |
void | drawCircle (glcd::Point center, uint16_t radius) |
void | drawEllipse (glcd::Point center, int16_t rx, int16_t ry) |
void | drawImage (glcd::Point start, modm::accessor::Flash< uint8_t > image) |
virtual void | drawImageRaw (glcd::Point start, uint16_t width, uint16_t height, modm::accessor::Flash< uint8_t > data) |
void | drawLine (glcd::Point start, glcd::Point end) |
void | drawLine (int16_t x1, int16_t y1, int16_t x2, int16_t y2) |
void | drawRectangle (glcd::Point start, uint16_t width, uint16_t height) |
void | drawRectangle (int16_t x, int16_t y, uint16_t width, uint16_t height) |
void | drawRoundedRectangle (glcd::Point start, uint16_t width, uint16_t height, uint16_t radius) |
IOStream & | endl () |
virtual void | fillCircle (glcd::Point center, uint16_t radius) |
void | fillRectangle (glcd::Point start, uint16_t width, uint16_t height) |
void | fillRectangle (int16_t x, int16_t y, uint16_t width, uint16_t height) |
IOStream & | flush () |
IOStream & | get (char &c) |
Reads one character and returns it if available. Otherwise, returns IOStream::eof. | |
IOStream & | get (char *s, size_t n) |
template<size_t N> | |
IOStream & | get (char (&s)[N]) |
color::Rgb565 | getBackgroundColor () const |
virtual std::size_t | getBufferHeight () const = 0 |
virtual std::size_t | getBufferWidth () const = 0 |
color::Rgb565 | getColor () const |
glcd::Point | getCursor () const |
uint8_t | getFontHeight () const |
virtual uint16_t | getHeight () const = 0 |
virtual color::Rgb565 | getPixel (int16_t x, int16_t y) const = 0 |
uint16_t | getStringWidth (const char *s) const |
virtual uint16_t | getWidth () const = 0 |
IOStream & | hex () |
set the output mode to hexadecimal style for integer types | |
IOStream & | operator<< (const bool &v) |
IOStream & | operator<< (const char &v) |
IOStream & | operator<< (const uint8_t &v) |
IOStream & | operator<< (const int16_t &v) |
IOStream & | operator<< (const uint16_t &v) |
IOStream & | operator<< (const int32_t &v) |
IOStream & | operator<< (const uint32_t &v) |
IOStream & | operator<< (const int64_t &v) |
IOStream & | operator<< (const uint64_t &v) |
IOStream & | operator<< (const int &v) |
IOStream & | operator<< (const unsigned int &v) |
IOStream & | operator<< (const float &v) |
IOStream & | operator<< (const double &v) |
IOStream & | operator<< (const char *s) |
IOStream & | operator<< (const void *p) |
write the hex value of a pointer | |
template<class Ret , class... Args> | |
IOStream & | operator<< (Ret (*pointer)(Args...)) |
Write the hex value of any function pointer. | |
IOStream & | operator<< (IOStream &(*format)(IOStream &)) |
IOStream & | printf (const char *fmt,...))) |
void | setBackgroundColor (const color::Rgb565 color) |
void | setColor (const color::Rgb565 color) |
void | setCursor (glcd::Point position) |
void | setCursor (int16_t x, int16_t y) |
void | setCursorX (int16_t x) |
void | setCursorY (int16_t y) |
void | setFont (const uint8_t *newFont) |
void | setFont (const modm::accessor::Flash< uint8_t > *font) |
virtual void | setPixel (int16_t x, int16_t y) = 0 |
void | setPixel (glcd::Point p) |
virtual void | update () = 0 |
IOStream & | vprintf (const char *fmt, va_list vlist))) |
void | write (char c) |
Static Public Member Functions | |
static uint8_t | getFontHeight (const modm::accessor::Flash< uint8_t > *font) |
static uint16_t | getStringWidth (const char *s, const modm::accessor::Flash< uint8_t > *font) |
Static Public Attributes | |
static constexpr char | eof = -1 |
Protected Member Functions | |
void | drawCircle4 (glcd::Point center, int16_t x, int16_t y) |
helper method for drawCircle() and drawEllipse() | |
virtual void | drawHorizontalLine (glcd::Point start, uint16_t length) |
virtual void | drawVerticalLine (glcd::Point start, uint16_t length) |
void | writeBin (uint8_t value) |
void | writeDouble (const double &value) |
void | writeFloat (float value) |
void | writeHex (uint8_t value) |
void | writeInteger (int16_t value) |
void | writeInteger (uint16_t value) |
void | writeInteger (int32_t value) |
void | writeInteger (uint32_t value) |
void | writeInteger (int64_t value) |
void | writeInteger (uint64_t value) |
template<typename T > | |
void | writeIntegerMode (const T v) |
void | writePointer (const void *value) |
Protected Attributes | |
color::Rgb565 | backgroundColor |
glcd::Point | cursor |
modm::accessor::Flash< uint8_t > | font |
color::Rgb565 | foregroundColor |
Writer | writer |
|
inheritedpure virtual |
Set whole screen to backgroundColor
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::ParallelTft< INTERFACE >, modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight >, modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 >, modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >, and modm::VirtualGraphicDisplay.
|
inheritedinline |
Set a pixel to backgroundColor
p | point |
|
inheritedpure virtual |
Set a pixel to backgroundColor
x | x-position |
y | y-position |
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::ParallelTft< INTERFACE >, modm::VirtualGraphicDisplay, modm::MonochromeGraphicDisplayVertical< Width, Height >, modm::MonochromeGraphicDisplayVertical< 128, Height >, modm::MonochromeGraphicDisplayVertical< 132, 176 >, modm::MonochromeGraphicDisplayVertical< 8 *COLUMNS, 8 *ROWS >, modm::MonochromeGraphicDisplayVertical< WIDTH, HEIGHT >, modm::MonochromeGraphicDisplayVertical< 84, 48 >, modm::MonochromeGraphicDisplayVertical< 176, 136 >, modm::MonochromeGraphicDisplayHorizontal< Width, Height >, and modm::MonochromeGraphicDisplayHorizontal< 8 *COLUMNS, 8 *ROWS >.
|
inherited |
Draw a filled rectangle with rounded corners
start | Upper left corner |
width | Width of rectangle |
height | Height of rectangle |
radius | Rounding radius |
Draw a circle
Uses the midpoint circle algorithm.
center | Center of the circle |
radius | Radius of the circle |
|
inherited |
Draw an ellipse.
Uses a variation of the midpoint algorithm. May be improved through simplification of the used formula.
center | Center of the ellipse |
rx | Radius in x-direction |
ry | Radius in y-direction |
|
inherited |
Draw an image.
The first byte in the image data specifies the with, the second byte the height. Afterwards the actual image data.
start | Upper left corner |
image | Image data in Flash |
|
inheritedvirtual |
Draw an image.
start | Upper left corner |
width | Image width |
height | Image height |
data | Image data in Flash without any size information. |
Reimplemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::MonochromeGraphicDisplayVertical< Width, Height >, modm::MonochromeGraphicDisplayVertical< 128, Height >, modm::MonochromeGraphicDisplayVertical< 132, 176 >, modm::MonochromeGraphicDisplayVertical< 8 *COLUMNS, 8 *ROWS >, modm::MonochromeGraphicDisplayVertical< WIDTH, HEIGHT >, modm::MonochromeGraphicDisplayVertical< 84, 48 >, and modm::MonochromeGraphicDisplayVertical< 176, 136 >.
|
inheritedinline |
Draw a line.
Uses the faster drawHorizontalLine() or drawVerticalLine() if possible, otherwise the line is rastered with the Bresenham line algorithm.
start | first point |
end | second point |
|
inherited |
Draw a line
x1 | Start x-position |
y1 | Start y-position |
x2 | End x-position |
y3 | End y-position |
|
inherited |
Draw a rectangle.
start | Upper left corner |
width | Width of rectangle |
height | Height of rectangle |
|
inheritedinline |
Draw a rectangle.
x | Upper left corner x-position |
y | Upper left corner y-position |
width | Width of rectangle |
height | Height of rectangle |
|
inherited |
Draw a rectangle with rounded corners
start | Upper left corner |
width | Width of rectangle |
height | Height of rectangle |
radius | Rounding radius |
|
inheritedvirtual |
Draw a filled circle.
center | Center of the circle |
radius | Radius of the circle |
Reimplemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >.
|
inherited |
Draw a filled rectangle.
start | Upper left corner |
width | Width of rectangle |
height | Height of rectangle |
|
inheritedinline |
Draw a rectangle.
x | Upper left corner x-position |
y | Upper left corner y-position |
width | Width of rectangle |
height | Height of rectangle |
|
inherited |
reads characters into NULL delimited c string in contrast to the standard implementation, this does not care about newline characters in the input
|
inheritedpure virtual |
Buffer-array size of second dimension
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight >, modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 >, modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >, and modm::ParallelTft< INTERFACE >.
|
inheritedpure virtual |
Buffer-array size of first dimension
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight >, modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 >, modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >, and modm::ParallelTft< INTERFACE >.
|
inherited |
Get the height of a character.
|
inheritedpure virtual |
Number of pixel in vertical direction.
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight >, modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 >, modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >, modm::ParallelTft< INTERFACE >, and modm::VirtualGraphicDisplay.
|
inherited |
Get the width of (null terminated) string.
|
inheritedpure virtual |
Number of pixel in horizontal direction.
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight >, modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 >, modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >, modm::ParallelTft< INTERFACE >, and modm::VirtualGraphicDisplay.
|
inheritedinline |
Set background color. Used when clearing the screen. Default is black.
|
inheritedinline |
Set a new foreground color. Used for drawing operations. Default is white.
|
inheritedinline |
Set the cursor for text drawing.
position | Cursor position |
|
inheritedinline |
Set the cursor for text drawing.
x | Cursor x-position |
y | Cursor y-position |
|
inheritedinline |
Set the cursor x-position for text drawing.
x | Cursor x-position |
|
inheritedinline |
Set the cursor y-position for text drawing.
y | Cursor y-position |
|
inheritedinline |
Set a new font.
Default font is modm::font::FixedWidth5x8.
newFont | Active font |
|
inheritedinline |
Set a pixel to foregroundColor
p | point |
|
inheritedpure virtual |
Set a pixel to foregroundColor
x | x-position |
y | y-position |
Implemented in modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::ParallelTft< INTERFACE >, modm::VirtualGraphicDisplay, modm::MonochromeGraphicDisplayVertical< Width, Height >, modm::MonochromeGraphicDisplayVertical< 128, Height >, modm::MonochromeGraphicDisplayVertical< 132, 176 >, modm::MonochromeGraphicDisplayVertical< 8 *COLUMNS, 8 *ROWS >, modm::MonochromeGraphicDisplayVertical< WIDTH, HEIGHT >, modm::MonochromeGraphicDisplayVertical< 84, 48 >, modm::MonochromeGraphicDisplayVertical< 176, 136 >, modm::MonochromeGraphicDisplayHorizontal< Width, Height >, and modm::MonochromeGraphicDisplayHorizontal< 8 *COLUMNS, 8 *ROWS >.
|
inheritedpure virtual |
Transfer the content of the RAM buffer to the real display.
Implemented in modm::Max7219MatrixHorizontal< SPI, CS, COLUMNS, ROWS >, modm::Max7219Matrix< SPI, CS, COLUMNS, ROWS >, modm::St7586s< SPI, CS, RST, DC, Width, Height >, modm::ili9341< Interface, Reset, Backlight, BufferSize >, modm::ParallelTft< INTERFACE >, modm::VirtualGraphicDisplay, modm::St7565< SPI, CS, A0, Reset, Width, Height, TopView >, modm::St7565< SPI, CS, A0, Reset, 128, 64, TopView >, modm::St7565< SPI, CS, A0, Reset, 132, 32, TopView >, modm::St7565< SPI, CS, A0, Reset, 102, 64, TopView >, and modm::Nokia5110< Spi, Ce, Dc, Reset >.
|
inherited |
Write a single character.