modm API documentation
modm::Ili9341ParallelInterface< INTERFACE > Class Template Reference
Inheritance diagram for modm::Ili9341ParallelInterface< INTERFACE >:
modm::ili9341< Interface, Reset, Backlight, BufferSize > modm::ColorGraphicDisplay modm::GraphicDisplay modm::IOStream

Classes

struct  BatchHandle
 

Public Typedefs

using DisplayMode = ili9341::DisplayMode
 
using Orientation = glcd::Orientation
 

Public Types

enum  DisplayMode : uint8_t { Normal = uint8_t(Command::InversionOff), Inverted = uint8_t(Command::InversionOn) }
 

Public Member Functions

 Ili9341ParallelInterface (INTERFACE &interface)
 
modm_noinline void writeCommand (Command command)
 
modm_noinline void writeCommand (Command command, uint8_t const *args, std::size_t length)
 
void writeData (uint8_t const *data, std::size_t length)
 
void writeCommandValue8 (Command command, uint8_t value)
 
void readData (Command command, uint8_t *buffer, std::size_t length)
 
uint8_t readData (Command command)
 
template<typename... Args>
 Ili9341 (Args &&...args)
 
IOStreamascii ()
 set the output mode to ASCII style for integer types
 
IOStreambin ()
 set the output mode to binary style for integer types
 
void clear () final
 
void clearPixel (int16_t x, int16_t y) final
 
void clearPixel (glcd::Point p)
 
void drawBitmap (glcd::Point upperLeft, uint16_t width, uint16_t height, modm::accessor::Flash< uint8_t > data)
 
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)
 
void drawImageRaw (glcd::Point upperLeft, uint16_t width, uint16_t height, modm::accessor::Flash< uint8_t > data) final
 
void drawLine (glcd::Point start, glcd::Point end)
 
void drawLine (int16_t x1, int16_t y1, int16_t x2, int16_t y2)
 
void drawRaw (glcd::Point upperLeft, uint16_t width, uint16_t height, color::Rgb565 *data)
 
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)
 
void enableBacklight (bool enable)
 
void enableSleep (bool enable)
 
IOStreamendl ()
 
void fillCircle (glcd::Point center, uint16_t radius)
 
void fillRectangle (glcd::Point upperLeft, uint16_t width, uint16_t height)
 
void fillRectangle (int16_t x, int16_t y, uint16_t width, uint16_t height)
 
IOStreamflush ()
 
IOStreamget (char &c)
 Reads one character and returns it if available. Otherwise, returns IOStream::eof.
 
IOStreamget (char *s, size_t n)
 
template<size_t N>
IOStreamget (char (&s)[N])
 
color::Rgb565 getBackgroundColor () const
 
std::size_t getBufferHeight () const final
 
std::size_t getBufferWidth () const final
 
color::Rgb565 getColor () const
 
glcd::Point getCursor () const
 
uint8_t getFontHeight () const
 
uint16_t getHeight () const final
 
uint16_t getIcModel ()
 
color::Rgb565 getPixel (int16_t x, int16_t y) const final
 
uint16_t getStringWidth (const char *s) const
 
uint16_t getWidth () const final
 
IOStreamhex ()
 set the output mode to hexadecimal style for integer types
 
void initialize ()
 
IOStreamoperator<< (const bool &v)
 
IOStreamoperator<< (const char &v)
 
IOStreamoperator<< (const uint8_t &v)
 
IOStreamoperator<< (const int16_t &v)
 
IOStreamoperator<< (const uint16_t &v)
 
IOStreamoperator<< (const int32_t &v)
 
IOStreamoperator<< (const uint32_t &v)
 
IOStreamoperator<< (const int64_t &v)
 
IOStreamoperator<< (const uint64_t &v)
 
IOStreamoperator<< (const int &v)
 
IOStreamoperator<< (const unsigned int &v)
 
IOStreamoperator<< (const float &v)
 
IOStreamoperator<< (const double &v)
 
IOStreamoperator<< (const char *s)
 
IOStreamoperator<< (const void *p)
 write the hex value of a pointer
 
template<class Ret , class... Args>
IOStreamoperator<< (Ret (*pointer)(Args...))
 Write the hex value of any function pointer.
 
IOStreamoperator<< (IOStream &(*format)(IOStream &))
 
IOStreamprintf (const char *fmt,...)))
 
void reset (bool hardReset=false)
 
void scrollTo (uint16_t row)
 
void setBackgroundColor (const color::Rgb565 color)
 
void setBrightness (uint8_t level)
 
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)
 
void setIdle (bool enable)
 
void setInvert (bool invert)
 
void setOrientation (glcd::Orientation orientation)
 
void setPixel (int16_t x, int16_t y) final
 
void setPixel (glcd::Point p)
 
void setScrollArea (uint16_t topFixedRows, uint16_t bottomFixedRows, uint16_t firstRow)
 
void turnOff ()
 
void turnOn ()
 
void update () final
 
IOStreamvprintf (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()
 
void drawHorizontalLine (glcd::Point start, uint16_t length) final
 
void drawVerticalLine (glcd::Point start, uint16_t length) final
 
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
 

Member Function Documentation

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::clear ( )
inheritedfinalvirtual

Set whole screen to backgroundColor

Implements modm::GraphicDisplay.

void modm::GraphicDisplay::clearPixel ( glcd::Point  p)
inheritedinline

Set a pixel to backgroundColor

Parameters
ppoint
template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::clearPixel ( int16_t  x,
int16_t  y 
)
inheritedinlinefinalvirtual

Set a pixel to backgroundColor

Parameters
xx-position
yy-position

Implements modm::GraphicDisplay.

void modm::GraphicDisplay::drawCircle ( glcd::Point  center,
uint16_t  radius 
)
inherited

Draw a filled rectangle with rounded corners

Parameters
startUpper left corner
widthWidth of rectangle
heightHeight of rectangle
radiusRounding radius

Draw a circle

Uses the midpoint circle algorithm.

Parameters
centerCenter of the circle
radiusRadius of the circle
void modm::GraphicDisplay::drawEllipse ( glcd::Point  center,
int16_t  rx,
int16_t  ry 
)
inherited

Draw an ellipse.

Uses a variation of the midpoint algorithm. May be improved through simplification of the used formula.

Parameters
centerCenter of the ellipse
rxRadius in x-direction
ryRadius in y-direction
void modm::GraphicDisplay::drawImage ( glcd::Point  start,
modm::accessor::Flash< uint8_t >  image 
)
inherited

Draw an image.

The first byte in the image data specifies the with, the second byte the height. Afterwards the actual image data.

Parameters
startUpper left corner
imageImage data in Flash
See also
drawImage()
template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::drawImageRaw ( glcd::Point  start,
uint16_t  width,
uint16_t  height,
modm::accessor::Flash< uint8_t >  data 
)
inheritedfinalvirtual

Draw an image.

Parameters
startUpper left corner
widthImage width
heightImage height
dataImage data in Flash without any size information.

Reimplemented from modm::GraphicDisplay.

void modm::GraphicDisplay::drawLine ( glcd::Point  start,
glcd::Point  end 
)
inheritedinline

Draw a line.

Uses the faster drawHorizontalLine() or drawVerticalLine() if possible, otherwise the line is rastered with the Bresenham line algorithm.

Parameters
startfirst point
endsecond point
void modm::GraphicDisplay::drawLine ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2 
)
inherited

Draw a line

Parameters
x1Start x-position
y1Start y-position
x2End x-position
y3End y-position
void modm::GraphicDisplay::drawRectangle ( glcd::Point  start,
uint16_t  width,
uint16_t  height 
)
inherited

Draw a rectangle.

Parameters
startUpper left corner
widthWidth of rectangle
heightHeight of rectangle
void modm::GraphicDisplay::drawRectangle ( int16_t  x,
int16_t  y,
uint16_t  width,
uint16_t  height 
)
inheritedinline

Draw a rectangle.

Parameters
xUpper left corner x-position
yUpper left corner y-position
widthWidth of rectangle
heightHeight of rectangle
void modm::GraphicDisplay::drawRoundedRectangle ( glcd::Point  start,
uint16_t  width,
uint16_t  height,
uint16_t  radius 
)
inherited

Draw a rectangle with rounded corners

Parameters
startUpper left corner
widthWidth of rectangle
heightHeight of rectangle
radiusRounding radius
template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::fillCircle ( glcd::Point  center,
uint16_t  radius 
)
inheritedvirtual

Draw a filled circle.

Parameters
centerCenter of the circle
radiusRadius of the circle

Reimplemented from modm::GraphicDisplay.

IOStream & modm::IOStream::get ( char *  s,
size_t  n 
)
inherited

reads characters into NULL delimited c string in contrast to the standard implementation, this does not care about newline characters in the input

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
std::size_t modm::ili9341< Interface, Reset, Backlight, BufferSize >::getBufferHeight ( ) const
inheritedinlinefinalvirtual

Buffer-array size of second dimension

Implements modm::GraphicDisplay.

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
std::size_t modm::ili9341< Interface, Reset, Backlight, BufferSize >::getBufferWidth ( ) const
inheritedinlinefinalvirtual

Buffer-array size of first dimension

Implements modm::GraphicDisplay.

uint8_t modm::GraphicDisplay::getFontHeight ( ) const
inherited

Get the height of a character.

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
uint16_t modm::ili9341< Interface, Reset, Backlight, BufferSize >::getHeight ( ) const
inheritedinlinefinalvirtual

Number of pixel in vertical direction.

Implements modm::GraphicDisplay.

uint16_t modm::GraphicDisplay::getStringWidth ( const char *  s) const
inherited

Get the width of (null terminated) string.

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
uint16_t modm::ili9341< Interface, Reset, Backlight, BufferSize >::getWidth ( ) const
inheritedinlinefinalvirtual

Number of pixel in horizontal direction.

Implements modm::GraphicDisplay.

void modm::ColorGraphicDisplay::setBackgroundColor ( const color::Rgb565  color)
inheritedinline

Set background color. Used when clearing the screen. Default is black.

void modm::ColorGraphicDisplay::setColor ( const color::Rgb565  color)
inheritedinline

Set a new foreground color. Used for drawing operations. Default is white.

void modm::GraphicDisplay::setCursor ( glcd::Point  position)
inheritedinline

Set the cursor for text drawing.

Parameters
positionCursor position
void modm::GraphicDisplay::setCursor ( int16_t  x,
int16_t  y 
)
inheritedinline

Set the cursor for text drawing.

Parameters
xCursor x-position
yCursor y-position
void modm::GraphicDisplay::setCursorX ( int16_t  x)
inheritedinline

Set the cursor x-position for text drawing.

Parameters
xCursor x-position
void modm::GraphicDisplay::setCursorY ( int16_t  y)
inheritedinline

Set the cursor y-position for text drawing.

Parameters
yCursor y-position
void modm::GraphicDisplay::setFont ( const uint8_t *  newFont)
inheritedinline

Set a new font.

Default font is modm::font::FixedWidth5x8.

Parameters
newFontActive font
See also
modm::font
void modm::GraphicDisplay::setPixel ( glcd::Point  p)
inheritedinline

Set a pixel to foregroundColor

Parameters
ppoint
template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::setPixel ( int16_t  x,
int16_t  y 
)
inheritedinlinefinalvirtual

Set a pixel to foregroundColor

Parameters
xx-position
yy-position

Implements modm::GraphicDisplay.

template<class Interface , class Reset , class Backlight , std::size_t BufferSize = 320>
void modm::ili9341< Interface, Reset, Backlight, BufferSize >::update ( )
inheritedinlinefinalvirtual

Transfer the content of the RAM buffer to the real display.

Implements modm::GraphicDisplay.

void modm::GraphicDisplay::write ( char  c)
inherited

Write a single character.


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