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

Public Typedefs

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

Public Types

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

Public Member Functions

template<typename... Args>
 Ili9341 (Args &&...args)
 
void initialize ()
 
void reset (bool hardReset=false)
 
uint16_t getIcModel ()
 
void turnOn ()
 
void turnOff ()
 
void enableBacklight (bool enable)
 
void setBrightness (uint8_t level)
 
void setInvert (bool invert)
 
void setIdle (bool enable)
 
void enableSleep (bool enable)
 
uint16_t getWidth () const final
 
uint16_t getHeight () const final
 
std::size_t getBufferWidth () const final
 
std::size_t getBufferHeight () const final
 
void setPixel (int16_t x, int16_t y) final
 
void clearPixel (int16_t x, int16_t y) final
 
color::Rgb565 getPixel (int16_t x, int16_t y) const final
 
void clear () final
 
void update () final
 
void setOrientation (glcd::Orientation orientation)
 
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)
 
void fillCircle (glcd::Point center, uint16_t radius)
 
void drawImageRaw (glcd::Point upperLeft, uint16_t width, uint16_t height, modm::accessor::Flash< uint8_t > data) final
 
void drawRaw (glcd::Point upperLeft, uint16_t width, uint16_t height, color::Rgb565 *data)
 
void setScrollArea (uint16_t topFixedRows, uint16_t bottomFixedRows, uint16_t firstRow)
 
void scrollTo (uint16_t row)
 
void drawBitmap (glcd::Point upperLeft, uint16_t width, uint16_t height, modm::accessor::Flash< uint8_t > data)
 
- Public Member Functions inherited from modm::ColorGraphicDisplay
void setColor (const color::Rgb565 color)
 
color::Rgb565 getColor () const
 
void setBackgroundColor (const color::Rgb565 color)
 
color::Rgb565 getBackgroundColor () const
 
- Public Member Functions inherited from modm::GraphicDisplay
void setPixel (glcd::Point p)
 
void clearPixel (glcd::Point p)
 
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 fillRectangle (glcd::Point start, uint16_t width, uint16_t height)
 
void fillRectangle (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 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 setCursor (glcd::Point position)
 
void setCursor (int16_t x, int16_t y)
 
void setCursorX (int16_t x)
 
void setCursorY (int16_t y)
 
glcd::Point getCursor () const
 
void setFont (const uint8_t *newFont)
 
void setFont (const modm::accessor::Flash< uint8_t > *font)
 
uint8_t getFontHeight () const
 
uint16_t getStringWidth (const char *s) const
 
void write (char c)
 
- Public Member Functions inherited from modm::IOStream
 IOStream (IODevice &odevice)
 
IOStream & write (char c)
 
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 &IOStream & flush ()
 
IOStream & endl ()
 
IOStream & bin ()
 set the output mode to binary style for integer types
 
IOStream & hex ()
 set the output mode to hexadecimal style for integer types
 
IOStream & ascii ()
 set the output mode to ASCII 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 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 &))
 

Protected Member Functions

void drawHorizontalLine (glcd::Point start, uint16_t length) final
 
void drawVerticalLine (glcd::Point start, uint16_t length) final
 
- Protected Member Functions inherited from modm::GraphicDisplay
void drawCircle4 (glcd::Point center, int16_t x, int16_t y)
 helper method for drawCircle() and drawEllipse()
 
- Protected Member Functions inherited from modm::IOStream
template<typename T >
void writeIntegerMode (const T v)
 
void writeInteger (int16_t value)
 
void writeInteger (uint16_t value)
 
void writeInteger (int32_t value)
 
void writeInteger (uint32_t value)
 
void writePointer (const void *value)
 
void writeHex (uint8_t value)
 
void writeBin (uint8_t value)
 

Additional Inherited Members

- Static Public Member Functions inherited from modm::GraphicDisplay
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 inherited from modm::IOStream
static constexpr char eof = -1
 
- Protected Attributes inherited from modm::ColorGraphicDisplay
color::Rgb565 foregroundColor
 
color::Rgb565 backgroundColor
 
- Protected Attributes inherited from modm::GraphicDisplay
Writer writer
 
modm::accessor::Flash< uint8_t > font
 
glcd::Point cursor
 

Member Function Documentation

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

Set whole screen to backgroundColor

Implements modm::GraphicDisplay.

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 
)
inlinefinalvirtual

Set a pixel to backgroundColor

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 >::drawImageRaw ( glcd::Point  start,
uint16_t  width,
uint16_t  height,
modm::accessor::Flash< uint8_t >  data 
)
finalvirtual

Draw an image.

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

Reimplemented from modm::GraphicDisplay.

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 
)
virtual

Draw a filled circle.

Parameters
centerCenter of the circle
radiusRadius of the circle

Reimplemented from modm::GraphicDisplay.

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

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
inlinefinalvirtual

Buffer-array size of first dimension

Implements modm::GraphicDisplay.

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

Number of pixel in vertical direction.

Implements modm::GraphicDisplay.

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

Number of pixel in horizontal direction.

Implements modm::GraphicDisplay.

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 
)
inlinefinalvirtual

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 ( )
inlinefinalvirtual

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

Implements modm::GraphicDisplay.


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